def find_file(self, path, tgt_env):
        tree = self.get_tree(tgt_env)
        if not tree:
            # Branch/tag/SHA not found in repo
            return None, None
        blob = None
        depth = 0
        while True:
            depth += 1
            if depth > SYMLINK_RECURSE_DEPTH:
                break
            try:
                if stat.S_ISLNK(tree[path].filemode):
                    # Path is a symlink. The blob data corresponding to this
                    # path's object ID will be the target of the symlink. Follow
                    # the symlink and set path to the location indicated
                    # in the blob data.
                    link_tgt = self.repo[tree[path].oid].data
                    path = os.path.normpath(
                        os.path.join(os.path.dirname(path), link_tgt)
                    )
                else:
                    oid = tree[path].oid
                    blob = self.repo[oid]
            except KeyError:
                break
        return blob, blob.hex if blob is not None else blob
If gpustats (or any other pycuda work) is used inside a 
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/Pygit2.find_file--crossover with--dataset/ETHPy150Open dukestats/gpustats/gpustats/util.py/threadSafeInit