code: def run_learner(job, learner, transformer, X, y, F, wf=None):
      """Sub-routine for running learner job"""
      if job != "fit":
          run_learner("fit", learner, transformer, X, y, F)
  
      P = np.zeros(F.shape)
  
      path = _get_path("manual", is_learner=True)
      args = {
          "dir": path,
          "job": job,
          "auxiliary": {"X": X, "y": y} if job == "fit" else {"X": X},
          "main": {"X": X, "y": y, "P": P}
          if job == "fit"
          else {"X": X, "P": P},
      }
  
      if transformer:
          transformer.setup(X, y, job)
          for obj in transformer(args, "auxiliary"):
              obj()
  
      learner.setup(X, y, job)
      for obj in learner(args, "main"):
          obj()
  
      if job == "fit":
          learner.collect()
          if transformer:
              transformer.collect()
  
      if isinstance(path, str):
          try:
              shutil.rmtree(path)
          except OSError:
              warnings.warn(
                  "Failed to destroy temporary test cache at %s" % path
              )
  
      if wf is not None:
          if job in ["fit", "transform"]:
              lrs = learner.sublearners
          else:
              lrs = learner.learner
          np.testing.assert_array_equal(P, F)
          w = [obj.estimator.coef_ for obj in lrs]
          np.testing.assert_array_equal(w, wf)
  
imports: from __future__ import division, print_function, with_statement
  import os
  import shutil
  import warnings
  from abc import abstractmethod
  import numpy
  from ..utils.utils import pickle_save, pickle_load
  from ..utils.dummy import OLS, LogisticRegression, Scale
  from ..externals.sklearn.base import clone
  from ..index import INDEXERS
  from ..ensemble.base import Sequential
  from ..estimators import LayerEnsemble
  from ..parallel import ParallelProcessing, Learner, Transformer, Layer, make_group, Pipeline
label_desc: Use image node_id 4 for calling a global function with example usage: run_learner(job, learner, transformer, X, y, F, wf) without return types