def METHOD_NAME(self, tag: str, value: Any) -> str:
    if isinstance(value, list):
        if len(value) == 1:
            (value,) = value
    if tag == "sub":
        value = normalize_subject(value)
    if not isinstance(value, str):
        raise ValueError
    return value