code: def _flatdata_depth(dataset):
      """Internal debugging method.
      Returns the depth of the dataset tree."""
      if isinstance(dataset, FlatData):
          dchilds = [_flatdata_depth(dd) for dd in dataset._datasets]
          if len(dchilds) == 0:
              return 1
          return 1 + max(dchilds)
      else:
          return 1
  
imports: import bisect
  import sys
  import numpy
  from avalanche.benchmarks.utils.dataset_utils import slice_alike_object_to_indices
  from typing import Iterable, List, Optional, Sequence, Tuple, TypeVar, Union, overload
  from torch.utils.data import ConcatDataset
  import itertools
  from avalanche.benchmarks.utils.dataset_definitions import IDataset
label_desc: Use image node_id 4 for calling a global function with example usage: _flatdata_depth(dataset) and returns: unknown, int, int