docs: 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)