def template_check(template_id_hex):
    """Checks the template hex vlad and returns the template name
    corresponding to it

    Parameters
    ----------
    template_id_hex: hex str of template id
        The template id retrieved from the parsed RAP packet

    Returns
    -------
       The corresponding template name associated with the hex value

    """
    return {
        '0001': 'SRC_IPV4',
        '0002': 'DST_IPV4',
        '0003': 'SRC_PORT',
        '0004': 'DST_PORT',
        '0005': 'PROTO',
        '0006': 'SRC_IPV6',
        '0007': 'DST_IPV6',
        '0008': 'IPV4_TOS',
        '0009': 'IPv6_FLOW_LABEL',
        '0010': 'PKT_COUNT',
        '0011': 'KBYTE_COUNT',
        '000a': 'CLASS_LABEL',
        '000b': 'MATCH_DIR',
        '000c': 'MSG_TYPE',
        '000d': 'TIME_TYPE',
        '000e': 'TIMEOUT',
        '000f': 'ACT_FLAG',
        '8000': 'ACT',
        '8001': 'ACT_PAR',
        '8002': 'CLASS_NAME',
        '8003': 'EXPORT_NAME',
        'c000': 'CLASS_TAG',
    }.get(template_id_hex, '0000')