code: def convert_MatMul(
      func, opset_version, input_names, output_names, context
  ):
      ndim_a = len(func.inputs[0].shape)
      ndim_b = len(func.inputs[1].shape)
  
      gb = onnx_helper.GraphBuilder()
      if ndim_a > 1 and func.transa:
          perm = list(range(ndim_a))
          perm[-1], perm[-2] = perm[-2], perm[-1]
          input_names[0] = gb.op(
              "Transpose", [input_names[0]], perm=perm
          )
      if ndim_b > 1 and func.transb:
          perm = list(range(ndim_b))
          perm[-1], perm[-2] = perm[-2], perm[-1]
          input_names[1] = gb.op(
              "Transpose", [input_names[1]], perm=perm
          )
      gb.op("MatMul", input_names)
      return gb.nodes(output_names)
  
imports: import numpy
  from onnx.mapping import NP_TYPE_TO_TENSOR_TYPE
  from onnx_chainer.functions.opset_version import support
  from onnx_chainer import onnx_helper
label_desc: Use image node_id 22 for calling a global function with example usage: convert_MatMul(func, opset_version, input_names, output_names, context) and returns: gb