code: def create_branches(self, left_nodes, right_nodes, threshold,
                          value, features, node, depth, init=False):
          
          out = ''
          if threshold[node] != -2.:
              if not init:
                  out += '\n'
              temp = self.temp('if', n_indents=depth, skipping=init)
              out += temp.format(features[node], '<=', self.repr(threshold[node]))
              if left_nodes[node] != -1.:
                  out += self.create_branches(
                      left_nodes, right_nodes, threshold, value,
                      features, left_nodes[node], depth + 1)
              out += '\n'
              out += self.temp('else', n_indents=depth)
              if right_nodes[node] != -1.:
                  out += self.create_branches(
                      left_nodes, right_nodes, threshold, value,
                      features, right_nodes[node], depth + 1)
              out += '\n'
              out += self.temp('endif', n_indents=depth)
          else:
              clazzes = []
              temp = self.temp('arr', n_indents=depth)
              for i, val in enumerate(value[node][0]):
                  clazz = temp.format(i, self.repr(val))
                  clazz = '\n' + clazz
                  clazzes.append(clazz)
              out += self.temp('join').join(clazzes) + self.temp('join')
          return out
docs: Parse and port a single tree estimator.
  
          Parameters
          ----------
          :param left_nodes : object
              The left children node.
          :param right_nodes : object
              The left children node.
          :param threshold : object
              The decision threshold.
          :param value : object
              The label or class.
          :param features : object
              The feature values.
          :param node : int
              The current node.
          :param depth : int
              The tree depth.
          :param init : bool, default: True
              Whether it's the initial tree or not.
  
          Returns
          -------
          :return out : string
              The ported single tree as function or method.