<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resample(source_area, data, destination_area, resampler=None, **kwargs):
 """Do the resampling."""

    if 'resampler_class' in kwargs:
        import warnings
        warnings.warn("'resampler_class' is deprecated, use 'resampler'",
                      DeprecationWarning)
        resampler = kwargs.pop('resampler_class')

    if not isinstance(resampler, BaseResampler):
        # we don't use the first argument (cache key)
        _, resampler_instance = prepare_resampler(source_area,
                                                  destination_area,
                                                  resampler)
    else:
        resampler_instance = resampler

    if isinstance(data, list):
        res = [resampler_instance.resample(ds, **kwargs) for ds in data]
    else:
        res = resampler_instance.resample(data, **kwargs)

    return res