class_docstr: Main class which validates the passed estimator and
  coordinates the kind of estimator to a concrete subclass.
docstr: Load the right subclass to read the passed estimator.
  
  Parameters
  ----------
  estimator : Union[ClassifierMixin, RegressorMixin]
      Set a fitted base estimator of scikit-learn.
  
  Returns
  -------
  A subclass from `sklearn_porter.estimator.*` which
  represents and includes the original base estimator.
docstr_tok: ["Load","the","right","subclass","to","read","the","passed","estimator",".","Parameters","--","--","--","--","--","estimator",":","Union","[","ClassifierMixin",",","RegressorMixin","]","Set","a","fitted","base","estimator","of","scikit-learn",".","Returns","--","--","--","-","A","subclass","from","`","sklearn_porter.estimator",".","*","`","which","represents","and","includes","the","original","base","estimator","."]
code: def _load_est(estimator):
      """
      Load the right subclass to read the passed estimator.
  
      Parameters
      ----------
      estimator : Union[ClassifierMixin, RegressorMixin]
          Set a fitted base estimator of scikit-learn.
  
      Returns
      -------
      A subclass from `sklearn_porter.estimator.*` which
      represents and includes the original base estimator.
      """
      est = estimator  # shorter <3
      qualname = _get_qualname(est)
      L.debug(
          "Start loading the passed estimator: `{}`.".format(qualname)
      )
  
      name = est.__class__.__qualname__
  
      msg = (
          "Your installed version of scikit-learn v{} does not support "
          "the `{}` estimator. Please update your local installation "
          "of scikit-learn with `pip install -U scikit-learn`."
      )
  
      # Classifiers:
      if name == "DecisionTreeClassifier":
          from sklearn.tree.tree import (
              DecisionTreeClassifier as DecisionTreeClassifierClass,
          )
  
          if isinstance(est, DecisionTreeClassifierClass):
              from sklearn_porter.estimator.DecisionTreeClassifier import (
                  DecisionTreeClassifier,
              )
  
              return DecisionTreeClassifier(est)
      elif name == "AdaBoostClassifier":
          from sklearn.ensemble.weight_boosting import (
              AdaBoostClassifier as AdaBoostClassifierClass,
          )
  
          if isinstance(estimator, AdaBoostClassifierClass):
              from sklearn_porter.estimator.AdaBoostClassifier import (
                  AdaBoostClassifier,
              )
  
              return AdaBoostClassifier(est)
      elif name == "RandomForestClassifier":
          from sklearn.ensemble.forest import (
              RandomForestClassifier as RandomForestClassifierClass,
          )
  
          if isinstance(estimator, RandomForestClassifierClass):
              from sklearn_porter.estimator.RandomForestClassifier import (
                  RandomForestClassifier,
              )
  
              return RandomForestClassifier(est)
      elif name == "ExtraTreesClassifier":
          from sklearn.ensemble.forest import (
              ExtraTreesClassifier as ExtraTreesClassifierClass,
          )
  
          if isinstance(estimator, ExtraTreesClassifierClass):
              from sklearn_porter.estimator.ExtraTreesClassifier import (
                  ExtraTreesClassifier,
              )
  
              return ExtraTreesClassifier(est)
      elif name == "LinearSVC":
          from sklearn.svm.classes import LinearSVC as LinearSVCClass
  
          if isinstance(estimator, LinearSVCClass):
              from sklearn_porter.estimator.LinearSVC import LinearSVC
  
              return LinearSVC(est)
      elif name == "SVC":
          from sklearn.svm.classes import SVC as SVCClass
  
          if isinstance(estimator, SVCClass):
              from sklearn_porter.estimator.SVC import SVC
  
              return SVC(est)
      elif name == "NuSVC":
          from sklearn.svm.classes import NuSVC as NuSVCClass
  
          if isinstance(estimator, NuSVCClass):
              from sklearn_porter.estimator.NuSVC import NuSVC
  
              return NuSVC(est)
      elif name == "KNeighborsClassifier":
          from sklearn.neighbors.classification import (
              KNeighborsClassifier as KNeighborsClassifierClass,
          )
  
          if isinstance(estimator, KNeighborsClassifierClass):
              from sklearn_porter.estimator.KNeighborsClassifier import (
                  KNeighborsClassifier,
              )
  
              return KNeighborsClassifier(est)
      elif name == "GaussianNB":
          from sklearn.naive_bayes import GaussianNB as GaussianNBClass
  
          if isinstance(estimator, GaussianNBClass):
              from sklearn_porter.estimator.GaussianNB import GaussianNB
  
              return GaussianNB(est)
      elif name == "BernoulliNB":
          from sklearn.naive_bayes import (
              BernoulliNB as BernoulliNBClass,
          )
  
          if isinstance(estimator, BernoulliNBClass):
              from sklearn_porter.estimator.BernoulliNB import (
                  BernoulliNB,
              )
  
              return BernoulliNB(est)
      elif name == "MLPClassifier":
          try:
              from sklearn.neural_network.multilayer_perceptron import (
                  MLPClassifier as MLPClassifierClass,
              )
          except ImportError:
              msg = msg.format(sklearn_version, name)
              L.error(msg)
              raise ValueError(msg)
          else:
              if isinstance(estimator, MLPClassifierClass):
                  from sklearn_porter.estimator.MLPClassifier import (
                      MLPClassifier,
                  )
  
                  return MLPClassifier(est)
  
      # Regressors:
      elif name == "MLPRegressor":
          try:
              from sklearn.neural_network.multilayer_perceptron import (
                  MLPRegressor as MLPRegressorClass,
              )
          except ImportError:
              msg = msg.format(sklearn_version, name)
              L.error(msg)
              raise ValueError(msg)
          else:
              if isinstance(estimator, MLPRegressorClass):
                  from sklearn_porter.estimator.MLPRegressor import (
                      MLPRegressor,
                  )
  
                  return MLPRegressor(est)
  
      msg = "The passed estimator `{}` is not supported.".format(name)
      raise exception.NotSupportedYetError(msg)
  
imports: import urllib.request
  from abc import ABCMeta
  from collections import OrderedDict
  from functools import partial
  from json import JSONDecodeError, loads
  from multiprocessing import Pool, cpu_count
  from os import environ, remove
  from pathlib import Path
  from shutil import which
  from subprocess import STDOUT, CalledProcessError, check_output
  from sys import platform, stdout, version_info
  from tempfile import mktemp
  from textwrap import dedent
  from time import sleep
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from loguru import logger
  from tabulate import tabulate
  from sklearn import __version__
  from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin
  from sklearn.ensemble import BaseEnsemble
  from sklearn.metrics import accuracy_score
  from sklearn_porter import decorators
  from sklearn_porter import enums
  from sklearn_porter import exceptions
  from sklearn_porter import meta
  from sklearn_porter.utils import options
label_desc: Use image node_id 14 for calling the Estimator obj's underlying member method code with example usage: obj._load_est(estimator) and returns: DecisionTreeClassifier, AdaBoostClassifier, RandomForestClassifier, ExtraTreesClassifier, LinearSVC, SVC, NuSVC, KNeighborsClassifier, GaussianNB, BernoulliNB, MLPClassifier, MLPRegressor