def METHOD_NAME() -> None:
    # Argument parsing
    parser = argparse.ArgumentParser(description="Process devspace yaml file.")
    parser.add_argument(
        "file", nargs="?", type=argparse.FileType("r"), default=sys.stdin
    )
    args = parser.parse_args()
    helm_dir = "helm"
    text = args.file.read()
    # input_file = f"{helm_dir}/raw_manifests.yaml"
    # with open(input_file, "w") as f:
    #     f.write(text)
    # Read input from file or stdin
    lines = text.splitlines()
    # Find first line that starts with 'apiVersion' and slice list from that point
    try:
        first_index = next(
            i for i, line in enumerate(lines) if line.strip().startswith("apiVersion")
        )
        input_data = "---\n" + "\n".join(lines[first_index - 1 :])
    except StopIteration:
        print("No line starting with 'apiVersion' found in the input.")
        return
    helm_chart_template_dir = f"{helm_dir}/syft/templates"
    # Split input_data into separate documents
    yaml_docs = input_data.split("---")
    # Sort YAML docs based on metadata name
    yaml_docs.sort(key=get_yaml_name)
    # Join sorted YAML docs
    sorted_input_data = "---".join(yaml_docs)
    # Save sorted YAML docs to file
    input_file = f"{helm_dir}/manifests.yaml"
    with open(input_file, "w") as f:
        f.write(sorted_input_data)
    for doc in yaml_docs:
        lines = doc.strip().split("\n")
        if len(lines) <= 2:
            continue  # skip empty sections
        output_dir = os.path.join(helm_chart_template_dir)
        # Create directories if they don't exist
        os.makedirs(output_dir, exist_ok=True)
        # Parse yaml to find metadata.name
        yaml_content = yaml.safe_load("\n".join(lines[1:]))  # exclude source_line
        fix_devspace_yaml(yaml_content)
        name = yaml_content.get("metadata", {}).get("name")
        if name:
            # Create new file with name or append if it already exists
            new_file = os.path.join(output_dir, f"{name}.yaml")
            if os.path.exists(new_file):
                mode = "a"  # append if file exists
            else:
                mode = "w"  # write if new file
            yaml_dump = yaml.dump(yaml_content)
            yaml_dump = (
                yaml_dump.replace("'{{", "{{")
                .replace("}}'", "}}")
                .replace("''{{", "{{")
                .replace("}}''", "}}")
            )
            with open(new_file, mode) as f:
                f.write("---\n" + yaml_dump)  # add document separator