code: def test_fid_same_input(feature):
      """If real and fake are update on the same data the fid score should be 0."""
      metric = FrechetInceptionDistance(feature=feature)
  
      for _ in range(2):
          img = torch.randint(
              0, 255, (10, 3, 299, 299), dtype=torch.uint8
          )
          metric.update(img, real=True)
          metric.update(img, real=False)
  
      assert torch.allclose(
          metric.real_features_sum, metric.fake_features_sum
      )
      assert torch.allclose(
          metric.real_features_cov_sum, metric.fake_features_cov_sum
      )
      assert torch.allclose(
          metric.real_features_num_samples,
          metric.fake_features_num_samples,
      )
  
      val = metric.compute()
      assert torch.allclose(val, torch.zeros_like(val), atol=1e-3)
  
imports: import pickle
  from contextlib import nullcontext
  from functools import partial
  import pytest
  import torch
  from torch.nn import Module
  from torch.utils.data import Dataset
  from torchmetrics.image.fid import FrechetInceptionDistance, NoTrainInceptionV3
  from torchmetrics.utilities.imports import _TORCH_FIDELITY_AVAILABLE
label_desc: Use image node_id 5 for calling a global function with example usage: test_fid_same_input(feature) without return types