def _entities_contains(self, field):
    if ((len(self._entities) == 1) and (self._entities[0] is self._model_class)):
        return True
    for f in self._entities:
        if ((f == field) is True):
            return True
        if (getattr(f, 'name', 'f.name') == getattr(field, 'name', 'field.name')):
            return True
    return False
def _entities_contains(self, field):
    if ((len(self._entities) == 1) and (self._entities[0] is self._model_class)):
        return True
    for f in self._entities:
        if ((f == field) is True):
            return True
        if (getattr(f, 'name', 'f.name') == getattr(field, 'name', 'field.name')):
            return True
    return False