You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: merge_batch_norm.m
    path of file: ./repos/cnnimageretrieval/cnninit
    
    the code of the file until where you have to start completion: function net  = merge_batch_norm(net)
% MERGE_BATCH_NORM function merges Batch Normalization layers into preceding Conv layers.
%
%   NET = merge_batch_norm(NET)
%

    
function net  = merge_batch_norm(net)
% MERGE_BATCH_NORM function merges Batch Normalization layers into preceding Conv layers.
%
%   NET = merge_batch_norm(NET)
%
% Authors: F. Radenovic, G. Tolias, O. Chum. 2017. 

  % find BatchNorm layers
  names = dagFindLayersOfType(net, 'dagnn.BatchNorm') ;
  
  % if no BatchNorm return
  if isempty(names), return;  end