code: def get_model_class(self):
          
          try:
              c = ContentType.objects.get(app_label=self.app, model=self.model)
          except ContentType.DoesNotExist:
              # try another kind of resolution
              # fixes a situation where a proxy model is defined in some external app.
              if django.VERSION >= (1, 7):
                  return apps.get_model(self.app, self.model)
          else:
              return c.model_class()
docs: Returns model class