code: def _common_caffe2_op_to_onnx_node(cls, op_def, shapes):
      node_def = NodeProto()
      node_def.name = op_def.name
  
      node_def.op_type = cls._renamed_operators.get(
          op_def.type, op_def.type
      )
  
      node_def.input.extend(op_def.input)
      node_def.output.extend(op_def.output)
  
      attrs = filter(
          None,
          [
              cls.caffe2_arg_to_onnx_attr(op_def, arg)
              for arg in op_def.arg
          ],
      )
      node_def.attribute.extend(attrs)
  
      return node_def
  
imports: import collections
  import itertools
  import logging
  import re
  from caffe2.python import core
  from onnx import checker, helper, numpy_helper, mapping, GraphProto, NodeProto, TensorProto, OperatorSetIdProto
  from onnx.helper import make_tensor_value_info, make_model
  import numpy
  from caffe2.python.onnx.helper import c2_native_run_net
  import caffe2.python._import_c_extension
label_desc: Use image node_id 4 for calling the Caffe2Frontend obj's underlying member method code with example usage: obj._common_caffe2_op_to_onnx_node(cls, op_def, shapes) and returns: node_def