class_docstr: Describes a callback to be used as a per-sample/per-frame argument to the operator.
  ----------
  `name` : Union[str, int]
      String with the name of a named argument of the operator or an int if the data
           should be passed as a positional input.
  `cb` : Callable[[SampleDesc], np.ndarray]
      Callback that based on the SampleDesc instance produces a single parameter for
           specific sample/frame.
  `is_per_frame` : bool
      Flag if the cb should be run for every sample (sequence) or for every frame.
           In the latter case, the argument is passed wrapped
           in per-frame call to the operator.
  `dest_device` : str
      Controls whether the produced data should be passed to the operator in cpu or gpu memory.
      If set to "gpu", the copy to gpu is added in the pipeline.
           Applicable only to positional inputs.
class_docstr_tok: ["Describes","a","callback","to","be","used","as","a","per-sample\/per-frame","argument","to","the","operator",".","--","--","--","--","--","`","name","`",":","Union","[","str",",","int","]","String","with","the","name","of","a","named","argument","of","the","operator","or","an","int","if","the","data","should","be","passed","as","a","positional","input",".","`","cb","`",":","Callable","[","[","SampleDesc","]",",","np.ndarray","]","Callback","that","based","on","the","SampleDesc","instance","produces","a","single","parameter","for","specific","sample\/frame",".","`","is_per_frame","`",":","bool","Flag","if","the","cb","should","be","run","for","every","sample","(","sequence",")","or","for","every","frame",".","In","the","latter","case",",","the","argument","is","passed","wrapped","in","per-frame","call","to","the","operator",".","`","dest_device","`",":","str","Controls","whether","the","produced","data","should","be","passed","to","the","operator","in","cpu","or","gpu","memory",".","If","set","to","``","gpu","''",",","the","copy","to","gpu","is","added","in","the","pipeline",".","Applicable","only","to","positional","inputs","."]
code: def __repr__(self):
      return "ArgCb{}".format((self.cb, self.desc))
  
imports: import os
  import random
  import numpy
  from typing import List, Union, Callable, Optional
  from dataclasses import dataclass, field
  from nvidia.dali import pipeline_def
  import nvidia.dali.fn
  from nvidia.dali import types
  import nvidia.dali.tensors
  from test_utils import get_dali_extra_path, check_batch
label_desc: Use image node_id 2 for calling the ArgCb obj's underlying member method code with example usage: obj.__repr__() and returns: str