class_docstr: Fold ``add``/``sub`` into ``bias`` of ``conv`` and ``conv_transpose``.
  That is, convert ``conv + add/sub`` to ``conv``, when ``add``/``sub`` is adding a constant.
  
  Two patterns are supported:
  
  .. code-block::
  
      Pattern 1:
      Given:
          %2 = conv(%1)
          ...
          %3 = add(%2, constant) # where constant has shape (1,C,1)/(C,1) for 1d conv, (1,C,1,1)/(C,1,1) for 2d conv etc
          ...
  
      Result:
          %3 = conv(%1)
          ...
  
  
      Pattern 2:
      Given:
          %2 = conv(%1)
          %3 = transpose(%2)
          ...
          %4 = add(%3, constant) # where constant has a broacasable shape
          ...
  
      Result:
          %2 = conv(%1)
          %4 = transpose(%2)
          ...
class_docstr_tok: ["Fold","``","add","``","\/","``","sub","``","into","``","bias","``","of","``","conv","``","and","``","conv_transpose","``",".","That","is",",","convert","``","conv","+","add\/sub","``","to","``","conv","``",",","when","``","add","``","\/","``","sub","``","is","adding","a","constant",".","Two","patterns","are","supported",":","..","code-block",":",":","Pattern","1",":","Given",":","%","2","=","conv","(","%","1",")","...","%","3","=","add","(","%","2",",","constant",")","#","where","constant","has","shape","(","1",",","C,1",")","\/","(","C,1",")","for","1d","conv",",","(","1",",","C,1,1",")","\/","(","C,1,1",")","for","2d","conv","etc","...","Result",":","%","3","=","conv","(","%","1",")","...","Pattern","2",":","Given",":","%","2","=","conv","(","%","1",")","%","3","=","transpose","(","%","2",")","...","%","4","=","add","(","%","3",",","constant",")","#","where","constant","has","a","broacasable","shape","...","Result",":","%","2","=","conv","(","%","1",")","%","4","=","transpose","(","%","2",")","..."]
code: def _fuse_conv_bias_block(self, block):
      fusion_status = False
      for op in list(block.operations):
          for b in op.blocks:
              block_changed = True
              while block_changed:
                  block_changed = self._fuse_conv_bias_block(b)
          if len(op.blocks) > 0:
              # This op can't be conv or conv_transpose
              continue
  
          # pattern 1 : conv + add/sub
          add_op = self._match_pattern(op)
          if add_op is not None:
              fusion_status = self._try_to_transform(op, add_op)
              # has to break as the downstream iterator is affected.
              if fusion_status:
                  return fusion_status
  
          # pattern 2 : conv + transpose + add/sub
          fusion_status = self._try_to_transform_transpose_pattern(
              op, block
          )
          if fusion_status:
              return fusion_status
  
      return fusion_status
  
imports: import copy
  import numpy
  from coremltools import _logger
  from coremltools.converters.mil.mil import Block
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import _check_child_op_type, _check_no_output_connection, block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
label_desc: Use image node_id 5 for calling the fuse_conv_bias obj's underlying member method code with example usage: obj._fuse_conv_bias_block(block) and returns: fusion_status, fusion_status, fusion_status