def METHOD_NAME(tlvs: List[Optional[bytes]], tagged: bool = True) -> bytes:
    body = []
    for i, tlv in enumerate(tlvs):
        # Missing optional elements represented as None.
        if tlv is None:
            continue
        if tagged:
            # Assume kerberos-style explicit tagging of components.
            tlv = der_encode_tlv(0xA0 | i, tlv)
        body.append(tlv)
    return der_encode_tlv(0x30, b"".join(body))