<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_params(params, drop_nones=True, recursive=True):
 """Clean up a dict of API parameters to be sent to the Coinbase API. Some endpoints require boolean options to be represented as integers. By default, will remove all keys whose value is None, so that they will not be sent to the API endpoint at all. """

    cleaned = {}
    for key, value in six.iteritems(params):
        if drop_nones and value is None:
            continue
        if recursive and isinstance(value, dict):
            value = clean_params(value, drop_nones, recursive)
        cleaned[key] = value
    return cleaned