<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scheme(name, bins, bin_method='quantiles'):
 """Return a custom scheme based on CARTOColors. Args: name (str):
 Name of a CARTOColor. bins (int or iterable):
 If an `int`, the number of bins for classifying data. CARTOColors have 7 bins max for quantitative data, and 11 max for qualitative data. If `bins` is a `list`, it is the upper range for classifying data. E.g., `bins` can be of the form ``(10, 20, 30, 40, 50)``. bin_method (str, optional):
 One of methods in :obj:`BinMethod`. Defaults to ``quantiles``. If `bins` is an interable, then that is the bin method that will be used and this will be ignored. .. Warning:: Input types are particularly sensitive in this function, and little feedback is given for errors. ``name`` and ``bin_method`` arguments are case-sensitive. """

    return {
        'name': name,
        'bins': bins,
        'bin_method': (bin_method if isinstance(bins, int) else ''),
    }