code: def _update_test_fid_kid(
      self, input_images: Tensor, pred: Tensor, clic_eval: bool = False
  ):
      assert self.test_kid is not None
      assert self.test_fid is not None
      assert self.test_fid_swav is not None
      if clic_eval:
          # this applies the FID/KID calculations from Mentzer 2020
          ncm.update_patch_fid(
              input_images=input_images,
              pred=pred,
              fid_metric=self.test_fid,
              fid_swav_metric=self.test_fid_swav,
              kid_metric=self.test_kid,
              patch_size=self.patch_size,
          )
      else:
          self.test_fid.update(
              ncF.image_to_255_scale(input_images, dtype=torch.uint8),
              real=True,
          )
          self.test_fid.update(
              ncF.image_to_255_scale(pred, dtype=torch.uint8),
              real=False,
          )
          self.test_fid_swav.update(
              ncF.image_to_255_scale(input_images, dtype=torch.uint8),
              real=True,
          )
          self.test_fid_swav.update(
              ncF.image_to_255_scale(pred, dtype=torch.uint8),
              real=False,
          )
          self.test_kid.update(
              ncF.image_to_255_scale(input_images, dtype=torch.uint8),
              real=True,
          )
          self.test_kid.update(
              ncF.image_to_255_scale(pred, dtype=torch.uint8),
              real=False,
          )
  
imports: import logging
  from typing import Optional, Union
  import torch
  from lightning.pytorch import LightningModule
  from torch import Tensor
  from torchmetrics import MeanSquaredError, PeakSignalNoiseRatio
  from torchmetrics.image import FrechetInceptionDistance, LearnedPerceptualImagePatchSimilarity
  import neuralcompression.functional
  import neuralcompression.metrics
  from neuralcompression import HyperpriorOutput
  from neuralcompression.metrics import MultiscaleStructuralSimilarity
label_desc: Use image node_id 5 for calling the ImageModule obj's underlying member method code with example usage: obj._update_test_fid_kid(input_images, pred, clic_eval) without return types