import inspect


def _is_model_ndb(ds_model):
  """Return whether or not the model is ndb."""
  for cls in inspect.getmro(ds_model):
    if 'google.appengine.ext.ndb' in cls.__module__:
      return True

  return False