code: def set_proxy(self, instance, state):
          
          if state in self.state_proxy:
              state_proxy = self.state_proxy[state]
  
              try:
                  app_label, model_name = state_proxy.split(".")
              except ValueError:
                  # If we can't split, assume a model in current app
                  app_label = instance._meta.app_label
                  model_name = state_proxy
  
              model = get_model(app_label, model_name)
              if model is None:
                  raise ValueError('No model found {0}'.format(state_proxy))
  
              instance.__class__ = model
docs: Change class