def METHOD_NAME():
    """
    :rtype: list[str]
    """
    # Earlier this was a `glob("%s/*.py" % _root_dir)`. But not anymore, since we have the new package structure.
    src_files = []
    for root, dirs, files in os.walk(_root_dir):
        if root == _root_dir:
            root = ""
        else:
            assert root.startswith(_root_dir + "/")
            root = root[len(_root_dir) + 1 :]  # relative to the root
            root += "/"
        # Ignore tests, or other irrelevant directories.
        if root == "":
            dirs[:] = ["returnn", "demos", "tools"]
        else:
            dirs[:] = sorted(dirs)
            # Ignore extern git submodules.
            dirs[:] = [d for d in dirs if not os.path.exists("%s/%s%s/.git" % (_root_dir, root, d))]
        for file in sorted(files):
            if not file.endswith(".py"):
                continue
            if file == "_setup_info_generated.py":
                continue
            src_files.append(root + file)
    return src_files