code: def pad_target_labels(in_val, max_length, dtype=np.float32):
      batch_size = len(in_val)
      out_val = np.zeros((batch_size, max_length), dtype=dtype)
      for i in range(batch_size):
          for index in in_val[i]:
              out_val[i, index] = 1.0
      return out_val
  
imports: import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: pad_target_labels(in_val, max_length, dtype) and returns: out_val