code: def _contains_subdirs(root: str):
      """Checks whether directory contains subdirectories.
  
      Args:
          root: Root directory path.
  
      Returns:
          True if root contains subdirectories else false.
  
      """
      with os.scandir(root) as scan_dir:
          return any(
              not _is_lightly_output_dir(f.name)
              for f in scan_dir
              if f.is_dir()
          )
  
file_path: lightly/lightly/data/_helpers.py
imports: import os
  from typing import Any, Callable, Dict, List, Optional, Set
  from torchvision import datasets
  from lightly.data._image import DatasetFolder
label_desc: Use image node_id 4 for calling a global function with example usage: _contains_subdirs(root) and returns: any