code: def test_trace_make_pad_mask(test_case):
      """Test if onnx-convertible make_pad_mask can be traced with torch.jit.trace
      If it's traceable then it can be exported to ONNX.
      """
      args, input_names, kwargs_trace, kwargs_non_trace = get_args(
          test_case.copy()
      )
      mpm = MakePadMaskTest(input_names)
      traced_function = torch.jit.trace(mpm, args)
      traced_output = traced_function(
          torch.LongTensor([3, 1, 2]), **kwargs_trace
      )
      non_traced_output = make_pad_mask([3, 1, 2], **kwargs_non_trace)
      assert (traced_output == non_traced_output).all()
  
file_path: espnet/test/test_nets_utils.py
imports: import pytest
  import torch
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask, trim_by_ctc_posterior
label_desc: Use image node_id 2 for calling a global function with example usage: test_trace_make_pad_mask(test_case) without return types