parameters: (self, session, model, **kwargs)
return_statement: return instance or model(**kwargs)
docstring: Get an ORM instance or create it if not exist.
          @param session: SQLAlchemy session object
          @param model: model to query
          @return: row instance
docstring_summary: Get an ORM instance or create it if not exist.
docstring_tokens: Get an ORM instance or create it if not exist .
function: def _get_or_create(self, session, model, **kwargs):
          """Get an ORM instance or create it if not exist.
          @param session: SQLAlchemy session object
          @param model: model to query
          @return: row instance
          """
          instance = session.query(model).filter_by(**kwargs).first()
          return instance or model(**kwargs)
function_tokens: def _get_or_create ( self , session , model , * * kwargs ) : instance = session . query ( model ) . filter_by ( * * kwargs ) . first ( ) return instance or model ( * * kwargs )