code: def _count_mixed(readers, probabilities, num_of_reads):
      result = len(probabilities) * [0]
  
      with WeightedSamplingReader(readers, probabilities) as mixer:
          for _ in six.moves.xrange(num_of_reads):
              reader_index = next(mixer).f1
              result[reader_index] += 1
  
      return result
  
imports: from __future__ import division
  import numpy
  import pytest
  import six
  import tensorflow.compat.v1
  from petastorm import make_reader
  from petastorm.ngram import NGram
  from petastorm.predicates import in_lambda
  from petastorm.pytorch import DataLoader
  from petastorm.test_util.reader_mock import ReaderMock
  from petastorm.tf_utils import tf_tensors, make_petastorm_dataset
  from petastorm.unischema import Unischema, UnischemaField
  from petastorm.weighted_sampling_reader import WeightedSamplingReader
  from petastorm.tests.test_tf_utils import create_tf_graph
label_desc: Use image node_id 1 for calling a global function with example usage: _count_mixed(readers, probabilities, num_of_reads) and returns: result