docstr: Generate information to be passed to ES callback.
  
  Args:
      idx_in_batch: Index in batch for per-sample mode, None indicates batch mode where we
      pass only the iteration number.
      lead: how many batches ahead is this job wrt actual iteration
docstr_tok: ["Generate","information","to","be","passed","to","ES","callback",".","Args",":","idx_in_batch",":","Index","in","batch","for","per-sample","mode",",","None","indicates","batch","mode","where","we","pass","only","the","iteration","number",".","lead",":","how","many","batches","ahead","is","this","job","wrt","actual","iteration"]
code: def callback_args(
      self, idx_in_batch, epoch_idx, batch_size=0, lead=0
  ):
      """Generate information to be passed to ES callback.
  
      Args:
          idx_in_batch: Index in batch for per-sample mode, None indicates batch mode where we
          pass only the iteration number.
          lead: how many batches ahead is this job wrt actual iteration
      """
      if not self.accepts_arg:
          return ()
      if idx_in_batch is not None:
          arg = nvidia.dali.types.SampleInfo(
              self.current_sample + idx_in_batch + batch_size * lead,
              idx_in_batch,
              self.current_iter + lead,
              epoch_idx,
          )
      elif self.batch_info:
          arg = nvidia.dali.types.BatchInfo(
              self.current_iter + lead, epoch_idx
          )
      else:
          arg = self.current_iter + lead
      return (arg,)
  
imports: from nvidia.dali import backend
  from nvidia.dali import tensors
  from nvidia.dali import types
  from nvidia.dali._multiproc.messages import TaskArgs, SampleRange
  import nvidia.dali.types
  from nvidia.dali._utils.external_source_impl import get_callback_from_source, accepted_arg_count, SourceKind
label_desc: Use image node_id 4 for calling the _ExternalSourceGroup obj's underlying member method code with example usage: obj.callback_args(idx_in_batch, epoch_idx, batch_size, lead) and returns: arg, 