class_docstr: Extract model data and port a DecisionTreeClassifier classifier.
class_docstr_tok: ["Extract","model","data","and","port","a","DecisionTreeClassifier","classifier","."]
docstr: Build a decision tree.
  
  Parameters
  ----------
  tpls : Environment
      All relevant templates.
  language : str
      The required language.
  converter : Callable[[object], str]
      The number converter.
  
  Returns
  -------
  A tree of a DecisionTreeClassifier.
docstr_tok: ["Build","a","decision","tree",".","Parameters","--","--","--","--","--","tpls",":","Environment","All","relevant","templates",".","language",":","str","The","required","language",".","converter",":","Callable","[","[","object","]",",","str","]","The","number","converter",".","Returns","--","--","--","-","A","tree","of","a","DecisionTreeClassifier","."]
code: def _create_tree(
      self,
      tpls: Environment,
      language: enum.Language,
      converter: Callable[[object], str],
  ):
      """
      Build a decision tree.
  
      Parameters
      ----------
      tpls : Environment
          All relevant templates.
      language : str
          The required language.
      converter : Callable[[object], str]
          The number converter.
  
      Returns
      -------
      A tree of a DecisionTreeClassifier.
      """
      n_indents = (
          1
          if language
          in {
              enum.Language.JAVA,
              enum.Language.JS,
              enum.Language.PHP,
              enum.Language.RUBY,
          }
          else 0
      )
      return self._create_branch(
          tpls,
          language,
          converter,
          self.model_data.get("lefts"),
          self.model_data.get("rights"),
          self.model_data.get("thresholds"),
          self.model_data.get("classes"),
          self.model_data.get("indices"),
          0,
          n_indents,
      )
  
file_path: sklearn-porter/sklearn_porter/estimator/DecisionTreeClassifier/__init__.py
imports: from copy import deepcopy
  from json import dumps, encoder
  from textwrap import indent
  from typing import Callable, Tuple, Union
  from jinja2 import Environment
  from loguru import logger
  from sklearn.tree.tree import DecisionTreeClassifier
  from sklearn_porter import enums
  from sklearn_porter import exceptions
  from sklearn_porter.estimator.EstimatorApiABC import EstimatorApiABC
  from sklearn_porter.estimator.EstimatorBase import EstimatorBase
label_desc: Use image node_id 3 for calling the DecisionTreeClassifier obj's underlying member method code with example usage: obj._create_tree(tpls, language, converter) and returns: self