code: def BaseTranslate(layer, caffe2_type):
      """A simple translate interface that maps the layer input and output."""
      caffe2_op = caffe2_pb2.OperatorDef()
      caffe2_op.type = caffe2_type
      caffe2_op.input.extend(layer.bottom)
      caffe2_op.output.extend(layer.top)
      return caffe2_op
  
imports: import argparse
  import copy
  import logging
  import re
  import numpy
  from caffe2.proto import caffe2_pb2, caffe2_legacy_pb2
  from caffe.proto import caffe_pb2
  from caffe2.python import core, utils, workspace
  from google.protobuf import text_format
label_desc: Use image node_id 11 for calling a global function with example usage: BaseTranslate(layer, caffe2_type) and returns: caffe2_op