def walk(self, path, locations=None):
        if locations is None:
            assert self.dirs in path, "%s not in %s" % (path, self.dirs)
            locations = []
        dirnames = []
        filenames = []
        for e in self.dirs[path]:
            if os.path.join(path, e) in self.dirs:
                dirnames.append(e)
                self.walk(os.path.join(path, e), locations)
            else:
                filenames.append(e)
        locations.append((path, dirnames, filenames))
        return locations

    # utilities that we need
    # pylint: disable=no-self-use
dataset/ETHPy150Open behave/behave/test/test_runner.py/FsMock.walk/swapped operands of `in`