code: def d4_image2label(model: nn.Module, image: Tensor) -> Tensor:
      """Test-time augmentation for image classification that averages predictions
      of all D4 augmentations applied to input image.
  
      :param model: Model to use for making predictions.
      :param image: Model input.
      :return: Arithmetically averaged predictions
      """
      return d4_labels_deaugment(model(d4_image_augment(image)))
  
imports: from collections import defaultdict
  from functools import partial
  from typing import Tuple, List, Optional, Union, Callable, Dict, Mapping
  import torch
  from torch import Tensor, nn
  from .None import functional
  from ..utils.support import pytorch_toolbelt_deprecated
label_desc: Use image node_id 9 for calling a global function with example usage: d4_image2label(model, image) and returns: d4_labels_deaugment