code: def create_base_learner(id):
      """This creates a single base learner from a base learner origin and queues it up"""
      path = functions.get_path_from_query_string(request)
  
      with functions.DBContextManager(path) as session:
          base_learner_origin = (
              session.query(models.BaseLearnerOrigin)
              .filter_by(id=id)
              .first()
          )
          if base_learner_origin is None:
              raise exceptions.UserError(
                  "Base learner origin {} not found".format(id), 404
              )
  
          if not base_learner_origin.final:
              raise exceptions.UserError(
                  "Base learner origin {} is not final".format(id)
              )
  
          req_body = request.get_json()
  
          # Retrieve full hyperparameters
          est = base_learner_origin.return_estimator()
          hyperparameters = functions.import_object_from_string_code(
              req_body["source"], "params"
          )
          est.set_params(**hyperparameters)
          hyperparameters = functions.make_serializable(
              est.get_params()
          )
  
          base_learners = (
              session.query(models.BaseLearner)
              .filter_by(
                  base_learner_origin_id=id,
                  hyperparameters=hyperparameters,
              )
              .all()
          )
          if base_learners:
              raise exceptions.UserError(
                  "Base learner exists with given hyperparameters"
              )
  
          base_learner = models.BaseLearner(
              hyperparameters, "queued", base_learner_origin
          )
  
          if "single_searches" not in base_learner_origin.description:
              base_learner_origin.description["single_searches"] = []
          base_learner_origin.description["single_searches"] += [
              req_body["source"]
          ]
  
          session.add(base_learner)
          session.add(base_learner_origin)
          session.commit()
  
          with Connection(get_redis_connection()):
              rqtasks.generate_meta_features.delay(
                  path, base_learner.id
              )
  
          return jsonify(base_learner.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 18 for calling a global function with example usage: create_base_learner(id) and returns: jsonify