code: def _calculate_tree_depth(self) -> int | float:
      max_depth = self.max_depth or math.inf
      if not self.randomize_tree_depth:
          return max_depth
      return self._rng.randint(
          1, max_depth if not math.isinf(max_depth) else 9999
      )
  
imports: from __future__ import annotations
  import abc
  import collections
  import math
  import random
  import sys
  from river import base, drift, metrics, tree, utils
  from river.tree.nodes.et_nodes import ETLeafAdaptive, ETLeafMean, ETLeafModel
  from river.tree.splitter.random_splitter import RegRandomSplitter
label_desc: Use image node_id 4 for calling the ExtraTrees obj's underlying member method code with example usage: obj._calculate_tree_depth() and returns: self, max_depth