code: def dummy_inputs(cls, params, init_case):
      max_seq_len = params["max_seq_len"]
      batch_size = params["batch_size"]
      fv_sizes = init_case["feat_vocab_sizes"]
      n_words = init_case["word_vocab_size"]
      voc_sizes = [n_words] + fv_sizes
      pad_idxs = [init_case["word_padding_idx"]] + init_case[
          "feat_padding_idx"
      ]
      lengths = torch.randint(0, max_seq_len, (batch_size,))
      lengths[0] = max_seq_len
      inps = torch.empty(
          (batch_size, max_seq_len, len(voc_sizes)), dtype=torch.long
      )
      for f, (voc_size, pad_idx) in enumerate(zip(voc_sizes, pad_idxs)):
          for b, len_ in enumerate(lengths):
              inps[b, :len_, f] = torch.randint(
                  0, voc_size - 1, (len_,)
              )
              inps[b, len_:, f] = pad_idx
      return inps
  
file_path: OpenNMT-py/onmt/tests/test_embeddings.py
imports: import unittest
  from onmt.modules.embeddings import Embeddings
  import itertools
  from copy import deepcopy
  import torch
  from torch.nn.init import xavier_uniform_
  from onmt.tests.utils_for_tests import product_dict
label_desc: Use image node_id 3 for calling the TestEmbeddings obj's underlying member method code with example usage: obj.dummy_inputs(cls, params, init_case) and returns: inps