code: def _dir_contains_videos(root: str, extensions: tuple):
      """Checks whether directory contains video files.
  
      Args:
          root: Root directory path.
  
      Returns:
          True if root contains video files.
  
      """
      with os.scandir(root) as scan_dir:
          return any(
              f.name.lower().endswith(extensions) for f in scan_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 1 for calling a global function with example usage: _dir_contains_videos(root, extensions) and returns: any