def _find_in_parent_dir(self, name):

        # We strip the '/' off of name if it's there
        # to help os.path.split()"""
        parent = self._normalize_to_dirname(os.path.split(name.strip('/'))[0])
        if not parent:
            return self.get_key('')
        if parent not in self.memoized_queries:
            iterator = self._run_list(name.rstrip('/'))
        else:
            iterator = self._run_list(parent)
        for x in iterator:
            if x.name == name:
                return x
Tries to take advantage of the fact that we probably queried the parent.
dataset/ETHPy150Open memsql/memsql-loader/memsql_loader/vendor/glob2/impl.py/S3Globber._find_in_parent_dir