code: def __init__(
      self,
      batch_load_fn=None,  # type: Callable
      batch=None,  # type: Optional[Any]
      max_batch_size=None,  # type: Optional[int]
      cache=None,  # type: Optional[Any]
      get_cache_key=None,  # type: Optional[Any]
      cache_map=None,  # type: Optional[Any]
      scheduler=None,  # type: Optional[Any]
  ):
      # type: (...) -> None
  
      if batch_load_fn is not None:
          self.batch_load_fn = batch_load_fn
  
      if not callable(self.batch_load_fn):
          raise TypeError(
              (
                  "DataLoader must be have a batch_load_fn which accepts "
                  "List<key> and returns Promise<List<value>>, but got: {}."
              ).format(batch_load_fn)
          )
  
      if batch is not None:
          self.batch = batch
  
      if max_batch_size is not None:
          self.max_batch_size = max_batch_size
  
      if cache is not None:
          self.cache = cache
  
      self.get_cache_key = get_cache_key or (lambda x: x)
      self._promise_cache = cache_map or {}
      self._queue = []  # type: List[Loader]
      self._scheduler = scheduler
  
file_path: wandb/wandb/vendor/promise-2.3.0/wandb_promise/dataloader.py
imports: from collections import namedtuple
  from functools import partial
  from threading import local
  from .promise import Promise, async_instance, get_default_scheduler
label_desc: Use image node_id 1 to create a new DataLoader object from inherited base classes: local with example: obj = DataLoader(batch_load_fn, batch, max_batch_size, cache, get_cache_key, cache_map, scheduler)