def METHOD_NAME(fullname: Name) -> Name:
    name = fullname.name
    parts = name.split('@', 1)
    if len(parts) == 2:
        return name_from_string(unmangle_name(parts[0]))
    else:
        return fullname