code: def test_reset_real_features_arg(reset_real_features):
      """Test that `reset_real_features` arg works as expected."""
      metric = KernelInceptionDistance(
          feature=64, reset_real_features=reset_real_features
      )
  
      metric.update(
          torch.randint(0, 180, (2, 3, 299, 299), dtype=torch.uint8),
          real=True,
      )
      metric.update(
          torch.randint(0, 180, (2, 3, 299, 299), dtype=torch.uint8),
          real=False,
      )
  
      assert len(metric.real_features) == 1
      assert list(metric.real_features[0].shape) == [2, 64]
  
      assert len(metric.fake_features) == 1
      assert list(metric.fake_features[0].shape) == [2, 64]
  
      metric.reset()
  
      # fake features should always reset
      assert len(metric.fake_features) == 0
  
      if reset_real_features:
          assert len(metric.real_features) == 0
      else:
          assert len(metric.real_features) == 1
          assert list(metric.real_features[0].shape) == [2, 64]
  
imports: import pickle
  from contextlib import nullcontext
  import pytest
  import torch
  from torch.nn import Module
  from torch.utils.data import Dataset
  from torchmetrics.image.kid import KernelInceptionDistance
  from torchmetrics.utilities.imports import _TORCH_FIDELITY_AVAILABLE
label_desc: Use image node_id 7 for calling a global function with example usage: test_reset_real_features_arg(reset_real_features) without return types