import inspect


def _is_model_class(obj):
  """Return whether or not the given object is a Model class."""
  if not inspect.isclass(obj):
    return False

  if obj.__name__ == 'Model':
    # Base model class, don't include.
    return False

  return 'Model' in [o.__name__ for o in inspect.getmro(obj)]