code: def entity(path: Union[str, pathlib.Path]) -> _Entity:
      
      return _Entity.from_path(_normalise_path(path))
docs: Retrieve an appropriate entity object from a path.
  
      :param path: The path of the entity to represent, either a string or Path
                   object.
      :return: An entity representing the input path.