code: def merge_output(res, total_pixels, batch_size):
      """Merge the split output."""
  
      model_outputs = {}
      for entry in res[0]:
          if res[0][entry] is None:
              continue
          if len(res[0][entry].shape) == 1:
              model_outputs[entry] = torch.cat(
                  [r[entry].reshape(batch_size, -1, 1) for r in res], 1
              ).reshape(batch_size * total_pixels)
          else:
              model_outputs[entry] = torch.cat(
                  [
                      r[entry].reshape(
                          batch_size, -1, r[entry].shape[-1]
                      )
                      for r in res
                  ],
                  1,
              ).reshape(batch_size * total_pixels, -1)
  
      return model_outputs
  
file_path: insightface/reconstruction/PBIDR/code/utils/general.py
imports: import os
  from glob import glob
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: merge_output(res, total_pixels, batch_size) and returns: model_outputs