code: def gather_all_features(features: Tensor, dim=0):
      return torch.cat(all_gather_with_backward(features), dim=dim)
  
file_path: ml-cvnets/utils/tensor_utils.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from torch import distributed
  from common import DEFAULT_IMAGE_CHANNELS, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, DEFAULT_VIDEO_FRAMES
  from utils.third_party.ddp_functional_utils import all_gather
label_desc: Use image node_id 7 for calling a global function with example usage: gather_all_features(features, dim) and returns: torch