def METHOD_NAME(
    script_folder: Folder, level_list: Optional[LevelListBin] = None
) -> ScriptFiles:
    """Returns information about the files used by the script engine in an 'introspectable' way."""
    script_files = ScriptFiles(common=[], maps=OrderedDict())
    for map_or_common_name, folder in script_folder.folders:
        if map_or_common_name == COMMON_DIR:
            # Common script directory
            for filename in folder.files:
                script_files["common"].append(filename)
        else:
            # Map directory
            map = MapEntry(
                name=map_or_common_name,
                enter_sse=None,
                enter_ssbs=[],
                subscripts=OrderedDict(),
                lsd=None,
                ssas=[],
            )
            ssa_stems = []
            ssbs = []
            script_files["maps"][map_or_common_name] = map
            for filename in folder.files:
                if filename == ENTER_SSE:
                    # Enter SSE
                    map["enter_sse"] = filename
                elif ENTER_SSB_PATTERN.match(filename):
                    # Enter SSB
                    map["enter_ssbs"].append(filename)
                elif filename == map_or_common_name.lower() + LSD_EXT:
                    # LSD file
                    map["lsd"] = filename
                elif filename.endswith(SSS_EXT):
                    # Subscript SSS
                    map["subscripts"][filename] = []
                elif filename.endswith(SSA_EXT):
                    # Acting SSA file
                    ssa_stems.append(filename[: -(len(SSA_EXT))])
                elif filename.endswith(SSB_EXT):
                    # Acting or Subscript SSB:
                    ssbs.append(filename)
            # Process ssbs
            for ssb in ssbs:
                ssb_stem = ssb[: -(len(SSB_EXT))]
                if ssb_stem in ssa_stems:
                    # SSB is for SSA file:
                    map["ssas"].append((ssb_stem + SSA_EXT, ssb))
                for subscript_name, list_of_ssbs_for_subscript in map[
                    "subscripts"
                ].items():
                    # SSB is for subscript
                    if ssb_stem.startswith(subscript_name[: -len(SSS_EXT)]):
                        list_of_ssbs_for_subscript.append(ssb)
                        break
    if level_list:
        # Add all empty levels
        for level in level_list.list:
            if level.name not in script_files["maps"]:
                script_files["maps"][level.name] = MapEntry(
                    name=level.name,
                    enter_sse=None,
                    enter_ssbs=[],
                    subscripts=OrderedDict(),
                    lsd=None,
                    ssas=[],
                )
    return script_files