code: def pad_4d_vals(
      in_vals,
      dim1_size,
      dim2_size,
      dim3_size,
      dim4_size,
      dtype=np.int32,
  ):
      out_val = np.zeros(
          (dim1_size, dim2_size, dim3_size, dim4_size), dtype=dtype
      )
      if dim1_size > len(in_vals):
          dim1_size = len(in_vals)
      for i in range(dim1_size):
          in_vals_i = in_vals[i]
          cur_dim2_size = dim2_size
          if cur_dim2_size > len(in_vals_i):
              cur_dim2_size = len(in_vals_i)
          for j in range(cur_dim2_size):
              in_vals_ij = in_vals_i[j]
              cur_dim3_size = dim3_size
              if cur_dim3_size > len(in_vals_ij):
                  cur_dim3_size = len(in_vals_ij)
              for k in range(cur_dim3_size):
                  in_vals_ijk = in_vals_ij[k]
                  cur_dim4_size = dim4_size
                  if cur_dim4_size > len(in_vals_ijk):
                      cur_dim4_size = len(in_vals_ijk)
                  out_val[i, j, k, :cur_dim4_size] = in_vals_ijk[
                      :cur_dim4_size
                  ]
      return out_val
  
imports: import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: pad_4d_vals(in_vals, dim1_size, dim2_size, dim3_size, dim4_size, dtype) and returns: out_val