def get_blob_or_tree(self, commit, path):
        try:
            (mode, oid) = tree_lookup_path(self.__getitem__, commit.tree,
                                           encode_for_git(path))
        except NotTreeError:
            # Some part of the path was a file where a folder was expected.
            # Example: path="/path/to/foo.txt" but "to" is a file in "/path".
            raise KeyError
        return self[oid]
Return the Git tree or blob object for `path` at `commit`.
dataset/ETHPy150Open jonashaag/klaus/klaus/repo.py/FancyRepo.get_blob_or_tree