How to get content by route in Umbraco 10?

How should I change this to achieve the same result in Umbraco 10? 

 public IPublishedContent GetContentByRoute(string route)
    {
        return Umbraco.Web.Composing.Current.UmbracoContext.Content.GetByRoute(route);
    }

This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/111072-how-to-get-content-by-route-in-umbraco-10