def analyzeCharCategory(char, char_cat_def):
    """Analyze a given character category by checking code points
    Parameters
    ----------
    char_cat_def: dictionary
        Dcitionary which is obtained by loadCharDef function.
    char: string
        A character to analyze

    Returns
    -------
    cat_name: string
       Category name
    """
    assert len(char) == 1
    cp = ord(char)
    for cat_name, params in char_cat_def.items():
        if 'code_points' in params:
            for cand_cp in params['code_points']:
                cp_beg, cp_end = cand_cp
                if cp >= int(cp_beg, 16) and cp <= int(cp_end, 16):
                    return cat_name