def get_color(col, color):
    """Function needed for backwards compatibility with the old "col" argument in
    plt functions. It returns the default color 'C0' if both arguments are None.
    If 'color' is not None, it always uses that. If 'color' is None and 
    'col' is an integer, it returns the corresponding 'CN' color. If 'col' is
    neither None nor integer, an error is raised."""
    if color is None and col is None:
        return 'C0'
    if col is None:
        return color
    if not isinstance(col, int):
        raise ValueError("`col` must be an integer. Consider using `color` instead.")
    return 'C{}'.format(col)