human
Complete this python program:
def create_detailed_pickling_error(exception, instance):
assistant
#Here is the Python code you requested.

    """MaybeEncodingError - PicklingError: Can\t pickle dictproxy #8748
    :param instance: The instance we failed to encode
    :return: We return the MaybeEncodingError, we include lots of information
    that allow me to debug what\s going wrong.
    """
    attribute = None
    def can_pickle(data):
        try:
            cPickle.dumps(v)
        except:
            return False
        else:
            return True
    if hasattr(instance, '__dict__'):
        for (k, v) in instance.__dict__.iteritems():
            if (not can_pickle(v)):
                attribute = k
                break
    elif isinstance(instance, dict):
        for (k, v) in instance.iteritems():
            if (not can_pickle(v)):
                attribute = k
                break
    elif isinstance(instance, (tuple, list)):
        for (i, v) in enumerate(instance):
            if (not can_pickle(v)):
                attribute = ('index-%s' % i)
                break
    wrapped = DetailedMaybeEncodingError(exception, instance, attribute)
    debug(('Possible    encoding    error    while    sending    result:    %s' % wrapped))
    return wrapped