code: def get_entity_propnames(entity):
      
      ins = entity if isinstance(entity, InstanceState) else inspect(entity)
      return set(
          ins.mapper.column_attrs.keys() +  # Columns
          ins.mapper.relationships.keys()  # Relationships
      )
docs: Get entity property names
  
          :param entity: Entity
          :type entity: sqlalchemy.ext.declarative.api.DeclarativeMeta
          :returns: Set of entity property names
          :rtype: set