code: def get_input_arg_per_frame(
      input_data: ArgData, param_cb, rng, check_broadcasting
  ):
      frame_idx = input_data.desc.expandable_prefix.find("F")
      assert frame_idx >= 0
  
      def arg_for_sample(sample_idx, batch_idx, sample):
          if check_broadcasting and rng.randint(1, 4) == 1:
              return np.array(
                  [
                      param_cb(
                          SampleDesc(
                              rng, 0, sample_idx, batch_idx, sample
                          )
                      )
                  ]
              )
          num_frames = sample.shape[frame_idx]
          return np.array(
              [
                  param_cb(
                      SampleDesc(
                          rng, frame_idx, sample_idx, batch_idx, sample
                      )
                  )
                  for frame_idx in range(num_frames)
              ]
          )
  
      return [
          [
              arg_for_sample(sample_idx, batch_idx, sample)
              for sample_idx, sample in enumerate(batch)
          ]
          for batch_idx, batch in enumerate(input_data.data)
      ]
  
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 11 for calling a global function with example usage: get_input_arg_per_frame(input_data, param_cb, rng, check_broadcasting) and returns: unknown, np, np