code: def _contains_videos(root: str, extensions: tuple):
      """Checks whether directory or any subdirectory contains video files.
  
      Iterates over all subdirectories of "root" recursively and returns True
      if any of the subdirectories contains a file with a VIDEO_EXTENSION.
  
      Args:
          root: Root directory path.
  
      Returns:
          True if "root" or any subdir contains video files.
  
      """
      for subdir, _, _ in os.walk(root):
          if _dir_contains_videos(subdir, extensions):
              return True
      return False
  
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 2 for calling a global function with example usage: _contains_videos(root, extensions) and returns: False, True