def enum_name(name: str) -> str:
    """ Capitalize all parts of a name to form a suitable enum name """
    if name.startswith("'"):
        return enum_name(name.strip("'"))

    s_parts = name.split("_")
    result = "".join([s.upper() for s in s_parts])
    return result