code: def create_inputs(model, features, tgt, batch_size, mask_freq):
      (
          tgt_ids,
          tgt_labels,
          tgt_paddings,
      ) = model.GetTask().input_generator.StringsToIds(tgt)
  
      # we expect src_inputs to be of shape [batch_size, num_frames, feature_dim, channels]
      src_paddings = tf.zeros(
          [tf.shape(features)[0], tf.shape(features)[1]],
          dtype=tf.float32,
      )
      src_paddings = 1.0 - mask_freq[:, :, 0]
      src_frames = tf.expand_dims(features, dim=-1)
  
      inputs = py_utils.NestedMap()
      inputs.tgt = py_utils.NestedMap(
          ids=tgt_ids,
          labels=tgt_labels,
          paddings=tgt_paddings,
          weights=1.0 - tgt_paddings,
      )
      inputs.src = py_utils.NestedMap(
          src_inputs=src_frames, paddings=src_paddings
      )
      inputs.sample_ids = tf.zeros([batch_size])
      return inputs
  
file_path: cleverhans/cleverhans_v3.1.0/examples/adversarial_asr/tool.py
imports: from tensorflow.python import pywrap_tensorflow
  import numpy
  import tensorflow
  from lingvo.core import asr_frontend
  from lingvo.core import py_utils
label_desc: Use image node_id 4 for calling a global function with example usage: create_inputs(model, features, tgt, batch_size, mask_freq) and returns: inputs