human
Complete the below
def fitter_unit_support(func):

    ''''This is a decorator that can be used to add support for dealing with
    quantities to any __call__ method on a fitter which may not support
    quantities itself. This is done by temporarily removing units from all
    parameters then adding them back once the fitting has completed.'
    '''
 Write me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def wrapper(self, model, x, y, z=None, equivalencies=None, **kwargs):
        data_has_units = (isinstance(x, Quantity) or isinstance(y, Quantity) or isinstance(z, Quantity))
        model_has_units = model._has_units
        if (data_has_units or model_has_units):
            if model._supports_unit_fitting:
                input_units_equivalencies = _combine_equivalency_dict(model.inputs, equivalencies, model.input_units_equivalencies)
                if (model.input_units is not None):
                    if isinstance(x, Quantity):
                        x = x.to(model.input_units[u'x'], equivalencies=input_units_equivalencies[u'x'])
                    if (isinstance(y, Quantity) and (z is not None)):
                        y = y.to(model.input_units[u'y'], equivalencies=input_units_equivalencies[u'y'])
                model = model.without_units_for_data(x=x, y=y, z=z)
                add_back_units = False
                if isinstance(x, Quantity):
                    add_back_units = True
                    xdata = x.value
                else:
                    xdata = np.asarray(x)
                if isinstance(y, Quantity):
                    add_back_units = True
                    ydata = y.value
                else:
                    ydata = np.asarray(y)
                if (z is not None):
                    if isinstance(y, Quantity):
                        add_back_units = True
                        zdata = z.value
                    else:
                        zdata = np.asarray(z)
                if (z is None):
                    model_new = func(self, model, xdata, ydata, **kwargs)
                else:
                    model_new = func(self, model, xdata, ydata, zdata, **kwargs)
                if add_back_units:
                    model_new = model_new.with_units_from_data(x=x, y=y, z=z)
                return model_new
            else:
                raise NotImplementedError(u'This    model    does    not    support    being    fit    to    data    with  ...