def clean_code(code: str) -> str:
    """Replaces certain parts of the code, which cannot be enforced via the generator"""

    # Mapping used for replacement
    replace_map = [
        ("...", "default_factory=list"),
        ("type_class", "typeClass"),
        ("type_name", "typeName"),
        ("from core", "from easyDataverse.core"),
    ]

    for replacement in replace_map:
        code = code.replace(*replacement)

    return code