<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def name_to_int(name):
 """Get a number for that colour name if not a name, then not a number """

    if not name:
        return float('nan')
    lower = name.lower()
    cga_names = {s: i for i, s in enumerate(colour_names.cga())}
    return cga_names.get(lower) or html_to_small_ansi(lower)