code: def compile_obj(self, obj):
          
          res = {}
          for column in self.columns:
              if isinstance(column['__col__'], ColumnProperty):
                  value = self._get_column_value(obj, column)
  
              elif isinstance(column['__col__'], RelationshipProperty):
                  value = self._get_relationship_value(obj, column)
  
              res[column['name']] = value
  
          return res
docs: generate a context based on the given obj
  
          :param obj: an instance of the model