docs: def walk(self,
               top=None,
               path=None,
               depth=0,
               maxdepth=-1,
               class_ref=None,
               class_pattern=None,
               return_classname=False,
               treat_dirs_as_objs=False):
          """
          Walk the directory structure and content in and below a directory.
          For each directory in the directory tree rooted at ``top`` (including
          ``top`` itself, but excluding '.' and '..'), yield a 3-tuple
          ``dirpath, dirnames, filenames``.
  
          Parameters
          ----------
  
          top : string, optional (default=None)
              A path to a starting directory relative to this directory,
              otherwise start at this directory.
  
          path : string, optional (default=None)
              A path prepended as a prefix on the ``dirpath``. This argument is
              used internally as the recursion traverses down through
              subdirectories.
  
          depth : int, optional (default=0)
              The current depth, used internally as the recursion traverses down
              through subdirectories.
  
          max_depth : int, optional (default=-1)
              The maximum depth in the directory hierarchy to traverse. There is
              no limit applied by default.
  
          class_ref : class, optional (default=None)
              If not None then only include objects that are instances of
              ``class_ref``.
  
          class_pattern : string, optional (default=None)
              If not None then only include objects in ``filenames`` with class
              names that match ``class_pattern``. ``class_pattern`` should be a
              Unix shell-style wildcarded string.
  
          return_classname : bool, optional (default=False)
              If True, then each entry in ``filenames`` is a tuple of
              the form ``(filename, classname)``.
  
          treat_dirs_as_objs : bool, optional (default=False)
              If True, ``filenames`` contains directories as well.
  
          Returns
          -------
  
          dirpath, dirnames, filenames : iterator
              An iterator over the 3-tuples ``dirpath, dirnames, filenames``.
              ``dirpath`` is a string, the path to the directory. ``dirnames`` is
              a list of the names of the subdirectories in ``dirpath``
              (excluding '.' and '..'). ``filenames`` is a list of the names of
              the non-directory files/objects in ``dirpath``.
  
          Notes
          -----
  
          The names in the lists are just names, with no path components.
          To get a full path (which begins with top) to a file or directory
          in ``dirpath``, use ``os.path.join(dirpath, name)``.
  
          """
          dirnames, objectnames = [], []
          tdirectory = self.GetDirectory(top) if top else self
          for key in tdirectory.keys(latest=True):
              name = key.GetName()
              classname = key.GetClassName()
              is_directory = classname.startswith('TDirectory')
              if is_directory:
                  dirnames.append(name)
              if not is_directory or treat_dirs_as_objs:
                  if class_ref is not None:
                      tclass = ROOT.TClass.GetClass(classname, True, True)
                      if not tclass or not tclass.InheritsFrom(class_ref.Class()):
                          continue
                  if class_pattern is not None:
                      if not fnmatch(classname, class_pattern):
                          continue
                  name = (name if not return_classname else (name, classname))
                  objectnames.append(name)
          if path:
              dirpath = os.path.join(path, tdirectory.GetName())
          elif not isinstance(tdirectory, ROOT.R.TFile):
              dirpath = tdirectory.GetName()
          else:
              dirpath = ''
          yield dirpath, dirnames, objectnames
          if depth == maxdepth:
              return
          for dirname in dirnames:
              rdir = tdirectory.GetDirectory(dirname)
              for x in rdir.walk(
                      class_ref=class_ref,
                      class_pattern=class_pattern,
                      depth=depth + 1,
                      maxdepth=maxdepth,
                      path=dirpath,
                      return_classname=return_classname,
                      treat_dirs_as_objs=treat_dirs_as_objs):
                  yield x