class_docstr: Close implementation of Papernot's attack on decision trees following Algorithm 2 and communication with the
  authors.
  
  | Paper link: https://arxiv.org/abs/1605.07277
docstr: Search a decision tree for a mis-classifying instance.
  
  :param position: An array with the original inputs to be attacked.
  :param original_class: original label for the instances we are searching mis-classification for.
  :param target: If the provided, specifies which output the leaf has to have to be accepted.
  :return: An array specifying the path to the leaf where the classification is either != original class or
           ==target class if provided.
docstr_tok: ["Search","a","decision","tree","for","a","mis-classifying","instance",".",":","param","position",":","An","array","with","the","original","inputs","to","be","attacked",".",":","param","original_class",":","original","label","for","the","instances","we","are","searching","mis-classification","for",".",":","param","target",":","If","the","provided",",","specifies","which","output","the","leaf","has","to","have","to","be","accepted",".",":","return",":","An","array","specifying","the","path","to","the","leaf","where","the","classification","is","either","!","=","original","class","or","==target","class","if","provided","."]
code: def _df_subtree(
      self,
      position: int,
      original_class: Union[int, np.ndarray],
      target: Optional[int] = None,
  ) -> List[int]:
      """
      Search a decision tree for a mis-classifying instance.
  
      :param position: An array with the original inputs to be attacked.
      :param original_class: original label for the instances we are searching mis-classification for.
      :param target: If the provided, specifies which output the leaf has to have to be accepted.
      :return: An array specifying the path to the leaf where the classification is either != original class or
               ==target class if provided.
      """
      # base case, we're at a leaf
      if self.estimator.get_left_child(
          position
      ) == self.estimator.get_right_child(position):
          if target is None:  # untargeted case
              if (
                  self.estimator.get_classes_at_node(position)
                  != original_class
              ):
                  path = [position]
              else:
                  path = [-1]
          else:  # targeted case
              if self.estimator.get_classes_at_node(position) == target:
                  path = [position]
              else:
                  path = [-1]
      else:  # go deeper, depths first
          res = self._df_subtree(
              self.estimator.get_left_child(position),
              original_class,
              target,
          )
          if res[0] == -1:
              # no result, try right subtree
              res = self._df_subtree(
                  self.estimator.get_right_child(position),
                  original_class,
                  target,
              )
              if res[0] == -1:
                  # no desired result
                  path = [-1]
              else:
                  res.append(position)
                  path = res
          else:
              # done, it is returning a path
              res.append(position)
              path = res
  
      return path
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/decision_tree_attack.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Union
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.estimators.classification.scikitlearn import ScikitlearnDecisionTreeClassifier
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 2 for calling the DecisionTreeAttack obj's underlying member method code with example usage: obj._df_subtree(position, original_class, target) and returns: path