code: def get_stream_assignments(
      cluster, num_workers, paths, block=True, active_only=False
  ):
      assignments = collections.defaultdict(dict)
      for worker_idx in range(num_workers):
          for path in paths:
              assignment = get_stream_assignment(
                  cluster, worker_idx, path, block, active_only
              )
              if assignment is not None:
                  assignments[worker_idx][path] = assignment
      return assignments
  
imports: import collections
  import os
  import pathlib
  import shutil
  import tempfile
  import time
  from absl.testing import parameterized
  from tensorflow.python.data.experimental.kernel_tests.service import test_base
  from tensorflow.python.data.experimental.ops import distributed_save_op
  from tensorflow.python.data.experimental.service import _pywrap_snapshot_utils
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import test_mode
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling a global function with example usage: get_stream_assignments(cluster, num_workers, paths, block, active_only) and returns: assignments