def METHOD_NAME(
    cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
):
    algorithm = tok.get_name(relativize=False)
    time_signed = tok.get_uint48()
    fudge = tok.get_uint16()
    mac_len = tok.get_uint16()
    mac = base64.b64decode(tok.get_string())
    if len(mac) != mac_len:
        raise SyntaxError("invalid MAC")
    original_id = tok.get_uint16()
    error = dns.rcode.METHOD_NAME(tok.get_string())
    other_len = tok.get_uint16()
    if other_len > 0:
        other = base64.b64decode(tok.get_string())
        if len(other) != other_len:
            raise SyntaxError("invalid other data")
    else:
        other = b""
    return cls(
        rdclass,
        rdtype,
        algorithm,
        time_signed,
        fudge,
        mac,
        original_id,
        error,
        other,
    )