code: def _fuse_layer_with_bias_layer(layer_idx, bias_idx, layers):
      layer_type = layers[layer_idx].WhichOneof("layer")
      if layer_type == "convolution":
          layer = layers[layer_idx].convolution
      elif layer_type == "innerProduct":
          layer = layers[layer_idx].innerProduct
      else:
          raise Exception(
              "Bias fusion not supper for layer "
              "type {} ".format(layer_type)
          )
  
      bias = layers[bias_idx].bias
  
      bb = _np.array(bias.bias.floatValue)
      if not layer.hasBias:
          layer.bias.floatValue.extend(bb)
          layer.hasBias = True
      else:
          lb = _np.array(layer.bias.floatValue)
          bp = lb + bb
          del layer.bias.floatValue[:]
          layer.bias.floatValue.extend(bp)
  
      # re-wire outputs and delete bias layer
      print(
          "Fused {}->{}".format(
              layers[layer_idx].name, layers[bias_idx].name
          )
      )
      del layers[layer_idx].output[:]
      layers[layer_idx].output.extend(layers[bias_idx].output)
      del layers[bias_idx]
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _fuse_layer_with_bias_layer(layer_idx, bias_idx, layers) without return types