code: def base_learner_origins_view():
      path = functions.get_path_from_query_string(request)
  
      if request.method == "GET":
          with functions.DBContextManager(path) as session:
              base_learner_origins = session.query(
                  models.BaseLearnerOrigin
              ).all()
              return jsonify(
                  list(map(lambda x: x.serialize, base_learner_origins))
              )
  
      if request.method == "POST":  # Create new base learner origin
          req_body = request.get_json()
          new_base_learner_origin = models.BaseLearnerOrigin(**req_body)
  
          with functions.DBContextManager(path) as session:
              session.add(new_base_learner_origin)
              session.commit()
              return jsonify(new_base_learner_origin.serialize)
  
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  import os
  from flask import request, jsonify, send_from_directory, g
  from redis import Redis
  from rq import Connection
  from sqlalchemy import create_engine
  from sklearn.model_selection import ParameterGrid
  from sklearn.model_selection import ParameterSampler
  from xcessiv import app, functions, exceptions, models, rqtasks
  from xcessiv.presets import learnersetting, metricsetting, cvsetting
  import six
label_desc: Use image node_id 14 for calling a global function with example usage: base_learner_origins_view() and returns: jsonify, jsonify