def get_zcl_attribute_type(code):
    """
    Determine a ZCL attribute's data type from its type code.

    Args:
        code(int): The ZCL data type code included in the packet.

    Returns:
        str: The ZCL attribute type.
    """

    opts = (0x00, "NULL",
            0x08, "DATA8",
            0x09, "DATA16",
            0x0a, "DATA24",
            0x0b, "DATA32",
            0x0c, "DATA40",
            0x0d, "DATA48",
            0x0e, "DATA56",
            0x0f, "DATA64",
            0x10, "BOOL",
            0x18, "MAP8",
            0x19, "MAP16",
            0x1a, "MAP24",
            0x1b, "MAP32",
            0x1c, "MAP40",
            0x1d, "MAP48",
            0x1e, "MAP56",
            0x1f, "MAP64",
            0x20, "UINT8",
            0x21, "UINT16",
            0x22, "UINT24",
            0x23, "UINT32",
            0x24, "UINT40",
            0x25, "UNIT48",
            0x26, "UNIT56",
            0x27, "UINT64",
            0x28, "INT8",
            0x29, "INT16",
            0x2a, "INT24",
            0x2b, "INT32",
            0x2c, "INT40",
            0x2d, "NIT48",
            0x2e, "NIT56",
            0x2f, "INT64",
            0x30, "ENUM8",
            0x31, "ENUM16",
            0x38, "SEMI",
            0x39, "SINGLE",
            0x3a, "DOUBLE",
            0x41, "OCTSTR",
            0x42, "STRING",
            0x43, "OCTSTR16",
            0x44, "STRING16",
            0x48, "ARRAY",
            0x4c, "STRUCT",
            0x50, "SET",
            0x51, "BAG",
            0xe0, "ToD",
            0xe1, "DATE",
            0xe2, "UTC",
            0xe8, "CLUSTERID",
            0xe9, "ATTRID",
            0xea, "BACOID",
            0xf0, "EUI64",
            0xf1, "KEY128",
            0xff, "UNK")

    if code in opts: return opts[opts.index(code) + 1]
    return "OPAQUE"