code: def fuse_layers(model, layers_to_fuse, inplace=False):
      """
      fuse layers in layers_to_fuse
  
      Args:
          model(nn.Layer): The model to be fused.
          layers_to_fuse(list): The layers' names to be fused. For
              example,"fuse_list = [["conv1", "bn1"], ["conv2", "bn2"]]".
              A TypeError would be raised if "fuse" was set as
              True but "fuse_list" was None.
                                Default: None.
          inplace(bool): Whether apply fusing to the input model.
                         Default: False.
  
      Return
          fused_model(paddle.nn.Layer): The fused model.
      """
      if not inplace:
          model = copy.deepcopy(model)
      for layers_list in layers_to_fuse:
          layer_list = []
          for layer_name in layers_list:
              parent_layer, sub_name = find_parent_layer_and_sub_name(
                  model, layer_name
              )
              layer_list.append(getattr(parent_layer, sub_name))
          new_layers = _fuse_func(layer_list)
          for i, item in enumerate(layers_list):
              parent_layer, sub_name = find_parent_layer_and_sub_name(
                  model, item
              )
              setattr(parent_layer, sub_name, new_layers[i])
      return model
  
file_path: PaddleDetection/ppdet/utils/fuse_utils.py
imports: import copy
  import paddle
  import paddle.nn
label_desc: Use image node_id 3 for calling a global function with example usage: fuse_layers(model, layers_to_fuse, inplace) and returns: model