code: def __init__(
      self,
      flow_datastore,
      run_id,
      steps=None,
      pathspecs=None,
      prefetch_data_artifacts=None,
      allow_not_done=False,
  ):
      self.task_datastores = flow_datastore.get_latest_task_datastores(
          run_id,
          steps=steps,
          pathspecs=pathspecs,
          allow_not_done=allow_not_done,
      )
  
      if prefetch_data_artifacts:
          # produce a set of SHA keys to prefetch based on artifact names
          prefetch = set()
          for ds in self.task_datastores:
              prefetch.update(
                  ds.keys_for_artifacts(prefetch_data_artifacts)
              )
          # ignore missing keys
          prefetch.discard(None)
  
          # prefetch artifacts and share them with all datastores
          # in this DatastoreSet
          preloaded = dict(flow_datastore.ca_store.load_blobs(prefetch))
          cache = ImmutableBlobCache(preloaded)
          flow_datastore.ca_store.set_blob_cache(cache)
  
      self.pathspec_index_cache = {}
      self.pathspec_cache = {}
      if not allow_not_done:
          for ds in self.task_datastores:
              self.pathspec_index_cache[ds.pathspec_index] = ds
              self.pathspec_cache[ds.pathspec] = ds
  
file_path: metaflow/metaflow/datastore/datastore_set.py
imports: import json
  from io import BytesIO
  from .exceptions import DataException
  from .content_addressed_store import BlobCache
label_desc: Use image node_id 1 to create a new TaskDataStoreSet object from inherited base classes: object with example: obj = TaskDataStoreSet(flow_datastore, run_id, steps, pathspecs, prefetch_data_artifacts, allow_not_done)