code: def get_fill_color(self, tree, node_id):
      # Fetch appropriate color for node
      if "rgb" not in self.colors:
          # Initialize colors and bounds if required
          self.colors["rgb"] = _color_brew(tree.n_classes[0])
          if tree.n_outputs != 1:
              # Find max and min impurities for multi-output
              self.colors["bounds"] = (
                  np.min(-tree.impurity),
                  np.max(-tree.impurity),
              )
          elif (
              tree.n_classes[0] == 1 and len(np.unique(tree.value)) != 1
          ):
              # Find max and min values in leaf nodes for regression
              self.colors["bounds"] = (
                  np.min(tree.value),
                  np.max(tree.value),
              )
      if tree.n_outputs == 1:
          node_val = (
              tree.value[node_id][0, :]
              / tree.weighted_n_node_samples[node_id]
          )
          if tree.n_classes[0] == 1:
              # Regression or degraded classification with single class
              node_val = tree.value[node_id][0, :]
              if (
                  isinstance(node_val, Iterable)
                  and self.colors["bounds"] is not None
              ):
                  # Only unpack the float only for the regression tree case.
                  # Classification tree requires an Iterable in `get_color`.
                  node_val = node_val.item()
      else:
          # If multi-output color node by impurity
          node_val = -tree.impurity[node_id]
      return self.get_color(node_val)
  
imports: from collections.abc import Iterable
  from io import StringIO
  from numbers import Integral
  import numpy
  from ..base import is_classifier
  from ..utils._param_validation import HasMethods, Interval, StrOptions, validate_params
  from ..utils.validation import check_array, check_is_fitted
  from .None import DecisionTreeClassifier, DecisionTreeRegressor, _criterion, _tree
  from ._reingold_tilford import Tree, buchheim
label_desc: Use image node_id 3 for calling the _BaseTreeExporter obj's underlying member method code with example usage: obj.get_fill_color(tree, node_id) and returns: self