code: def is_abstract_model(model):
      
      return hasattr(model, '_meta') and hasattr(model._meta, 'abstract') and model._meta.abstract
docs: Given a model class, returns a boolean True if it is abstract and False if it is not.