code: def chunked_forward(model, input, chunks=CHUNKS):
      output_chunks = []
  
      for chunk in input.chunk(chunks):
          output_chunks.append(model(chunk))
  
      return torch.cat(output_chunks)
  
file_path: fairscale/tests/nn/pipe/test_deferred_batch_norm.py
imports: from copy import deepcopy
  from itertools import chain
  import pytest
  import torch
  from torch import nn, optim
  from fairscale.nn.pipe.batchnorm import DeferredBatchNorm
label_desc: Use image node_id 2 for calling a global function with example usage: chunked_forward(model, input, chunks) and returns: torch