class_docstr: Robustness verification for decision-tree-based models.
  Following the implementation in https://github.com/chenhongge/treeVerification (MIT License, 9 August 2019)
  
  | Paper link: https://arxiv.org/abs/1906.03849
docstr: Determine the distance between sample and interval box.
  
  :param box: Interval box.
  :param i_sample: Index of training sample in `x`.
  :param norm: The norm to apply epsilon.
  :return: The distance.
docstr_tok: ["Determine","the","distance","between","sample","and","interval","box",".",":","param","box",":","Interval","box",".",":","param","i_sample",":","Index","of","training","sample","in","`","x","`",".",":","param","norm",":","The","norm","to","apply","epsilon",".",":","return",":","The","distance","."]
code: def _get_distance(
      self, box: Box, i_sample: int, norm: float
  ) -> float:
      """
      Determine the distance between sample and interval box.
  
      :param box: Interval box.
      :param i_sample: Index of training sample in `x`.
      :param norm: The norm to apply epsilon.
      :return: The distance.
      """
      resulting_distance = 0.0
  
      for feature, interval in box.intervals.items():
          feature_value = self.x[i_sample, feature]
  
          if (
              interval.lower_bound
              < feature_value
              < interval.upper_bound
          ):
              distance = 0.0
          else:
              difference = max(
                  feature_value - interval.upper_bound,
                  interval.lower_bound - feature_value,
              )
              if norm == 0:
                  distance = 1.0
              elif norm == np.inf:
                  distance = difference
              else:
                  distance = pow(difference, norm)
  
          if norm == np.inf:
              resulting_distance = max(resulting_distance, distance)
          else:
              resulting_distance += distance
  
      if norm not in [0, np.inf]:
          resulting_distance = pow(resulting_distance, 1.0 / norm)
  
      return resulting_distance
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 5 for calling the RobustnessVerificationTreeModelsCliqueMethod obj's underlying member method code with example usage: obj._get_distance(box, i_sample, norm) and returns: resulting_distance