def refresh_from(self, values, api_key=None, partial=False):
        self.api_key = api_key or getattr(values, 'api_key', None)

        # Wipe old state before setting new.
        if partial:
            self._unsaved_values = (self._unsaved_values - set(values))
        else:
            removed = set(values) - set(self.keys())
            self._transient_values = self._transient_values | removed
            self._unsaved_values = set()

            self.clear()

        self._transient_values = self._transient_values - set(values)

        for k, v in values.iteritems():
            super(ShippoObject, self).__setitem__(
                k, convert_to_shippo_object(v, api_key))

        self._previous_metadata = values.get('metadata')
dataset/ETHPy150Open goshippo/shippo-python-client/shippo/resource.py/ShippoObject.refresh_from/swapped operands of `-`