code: def get_downloader_cls(
      remote_dir: str, cache_dir: str, chunks: List[Dict[str, Any]]
  ) -> Downloader:
      for k, cls in _DOWNLOADERS.items():
          if str(remote_dir).startswith(k):
              return cls(remote_dir, cache_dir, chunks)
      raise ValueError(
          f"The provided `remote_dir` {remote_dir} doesn't have a downloader associated."
      )
  
file_path: pytorch-lightning/src/lightning/data/streaming/downloader.py
imports: import os
  import shutil
  from abc import ABC
  from typing import Any, Dict, List
  from urllib import parse
  from lightning.data.streaming.client import S3Client
label_desc: Use image node_id 1 for calling a global function with example usage: get_downloader_cls(remote_dir, cache_dir, chunks) and returns: cls