code: def __iter__(self):
      for data in self.train:
          self.queue.append(
              (
                  dict(
                      xindex=data["xindex"],
                      uindex=data["uindex"],
                      x=data["x"],
                      label=data["label"],
                      secret_label=data["secret_label"],
                  ),
                  self.pool.apply_async(
                      self.numpy_apply_policies,
                      (data["x"], data["u"], self.cta),
                  ),
              )
          )
          if len(self.queue) > 2 * FLAGS.para_augment:
              d, pd = self.queue.pop(0)
              d.update(pd.get())
              probe = self.predict(d["probe"])
              w1 = 1 - 0.5 * np.abs(probe - d["label"]).sum(1)
              for p in range(w1.shape[0]):
                  self.cta.update_rates(d["policy"][p], w1[p])
              yield d
  
file_path: objax/examples/fixmatch/libml/augment/augment.py
imports: import functools
  import inspect
  import multiprocessing
  from typing import Tuple, Callable, Union, List, Type, Optional
  import numpy
  import tensorflow
  from absl import flags
  import objax
  from examples.fixmatch.libml.augment import ctaugment
  from examples.fixmatch.libml.augment.core import get_tf_augment
  from examples.fixmatch.libml.data import core
label_desc: Use image node_id 3 for calling the AugmentPoolCTA obj's underlying member method code with example usage: obj.__iter__() without return types