code: def extract_iterator_properties(
      input_iterator_probs: Dict[str, float]
  ):
      """Helper function for RandomizedBatchSampler and AlternatingRandomizedBatchSampler
      to generate iterator properties: iterator_names and iterator_probs.
      """
      iterator_names = list(input_iterator_probs)
      iterator_probs = np.array(
          [float(input_iterator_probs[name]) for name in iterator_names]
      )
      iterator_probs /= iterator_probs.sum()
  
      return iterator_names, iterator_probs
  
imports: from collections.abc import Iterator
  from typing import Dict, Optional
  import numpy
  from pytext.config.component import Component, ComponentType
label_desc: Use image node_id 2 for calling a global function with example usage: extract_iterator_properties(input_iterator_probs) and returns: iterator_names,  iterator_probs