code: def _convert_gemm(node, graph, err):
      node_name = node.name
      input_name = str(node.inputs[0])
      output_name = str(node.outputs[0])
      weight_name = node.inputs[1]
      if weight_name in node.input_tensors:
          W = node.input_tensors[weight_name]
      else:
          err.missing_initializer(
              node,
              "Weight tensor: {} not found in the graph initializer".format(
                  weight_name,
              ),
          )
          return
  
      if node.attrs["broadcast"] != 1 or node.attrs["transB"] != 1:
          return err.unsupported_op_configuration(
              node, "Gemm is supported only for inner_product layer"
          )
  
      b = None
      bias_flag = False
      if len(node.inputs) > 2:
          b = node.input_tensors[node.inputs[2]]
  
      if len(W.shape) != 2 or (b is not None and len(b.shape) != 1):
          return err.unsupported_op_configuration(
              node, "Gemm is supported only for inner_product layer"
          )
      if b is not None:
          bias_flag = True
          if W.shape[0] != b.shape[0]:
              return err.unsupported_op_configuration(
                  node, "Gemm is supported only for inner_product layer"
              )
  
      layer = myf(
          "InnerProduct",
          node_name,
          [input_name],
          [output_name],
          num_output=W.shape[0],
          bias_term=bias_flag,
      )
      graph.channel_dims[output_name] = W.shape[0]
  
      return layer
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from caffe import params
  import math
  import numpy
  from ._graph import Node, Graph
  from MyCaffe import Function
label_desc: Use image node_id 13 for calling a global function with example usage: _convert_gemm(node, graph, err) and returns: layer, err, err, err