class_docstr: Main class which validates the passed estimator and
  coordinates the kind of estimator to a concrete subclass.
docstr: Validate and coordinate the passed estimator for transpiling.
  
  Parameters
  ----------
  estimator : BaseEstimator
      Set a fitted base estimator of scikit-learn.
  class_name : str
      Change the default class name which will be used in the generated
      output. By default the class name of the passed estimator will be
      used, e.g. `DecisionTreeClassifier`.
  converter : Callable
      Change the default converter of all floating numbers from the model
      data. By default a simple string cast `str(value)` will be used.
docstr_tok: ["Validate","and","coordinate","the","passed","estimator","for","transpiling",".","Parameters","--","--","--","--","--","estimator",":","BaseEstimator","Set","a","fitted","base","estimator","of","scikit-learn",".","class_name",":","str","Change","the","default","class","name","which","will","be","used","in","the","generated","output",".","By","default","the","class","name","of","the","passed","estimator","will","be","used",",","e.g",".","`","DecisionTreeClassifier","`",".","converter",":","Callable","Change","the","default","converter","of","all","floating","numbers","from","the","model","data",".","By","default","a","simple","string","cast","`","str","(","value",")","`","will","be","used","."]
code: def __init__(
      self,
      estimator: BaseEstimator,
      language: Optional[Union[str, enum.Language]] = None,
      template: Optional[Union[str, enum.Template]] = None,
      class_name: Optional[str] = None,
      converter: Optional[Callable[[object], str]] = None,
  ):
      """
      Validate and coordinate the passed estimator for transpiling.
  
      Parameters
      ----------
      estimator : BaseEstimator
          Set a fitted base estimator of scikit-learn.
      class_name : str
          Change the default class name which will be used in the generated
          output. By default the class name of the passed estimator will be
          used, e.g. `DecisionTreeClassifier`.
      converter : Callable
          Change the default converter of all floating numbers from the model
          data. By default a simple string cast `str(value)` will be used.
      """
      L.remove()  # remove basic logger
      logging_level = options.get("logging.level")
      L.add(stdout, level=logging_level)
  
      self.python_version = ".".join(map(str, version_info[:3]))
      self.porter_version = str(meta.__version__)
  
      L.debug("Platform: {}".format(platform))
      L.debug("Python: v{}".format(self.python_version))
      L.debug("Package: scikit-learn: v{}".format(sklearn_version))
      L.debug(
          "Package: sklearn-porter: v{}".format(self.porter_version)
      )
  
      self.estimator = estimator  # see @estimator.setter
  
      def either_or(a, b):
          return a if a else b
  
      # Set defaults:
      self.language = either_or(
          language, self._estimator.DEFAULT_LANGUAGE
      )
      self.template = either_or(
          template, self._estimator.DEFAULT_TEMPLATE
      )
      self.class_name = either_or(
          class_name, self._estimator.estimator_name
      )
      self.converter = either_or(converter, lambda x: str(x))
  
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 1 to create a new Estimator object  with example: obj = Estimator(estimator, language, template, class_name, converter)