def _extract_tree_entry(self, path, tree_response):
        tree_response.rethrow()
        jsondata = response_text(tree_response)
        data = json.loads(jsondata)
        for entry in data['tree']:
            if entry['path'] == path:
                return entry
        
        raise HTTPError(404, "%s not found among %i files" % (path, len(data['tree'])))
extract a single tree entry from a file list
dataset/ETHPy150Open jupyter/nbviewer/nbviewer/providers/github/client.py/AsyncGitHubClient._extract_tree_entry