code: def test_reset_real_features_arg(reset_real_features):
      """Test that `reset_real_features` argument works as expected."""
      metric = FrechetInceptionDistance(
          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 metric.real_features_num_samples == 2
      assert metric.real_features_sum.shape == torch.Size([64])
      assert metric.real_features_cov_sum.shape == torch.Size([64, 64])
  
      assert metric.fake_features_num_samples == 2
      assert metric.fake_features_sum.shape == torch.Size([64])
      assert metric.fake_features_cov_sum.shape == torch.Size([64, 64])
  
      metric.reset()
  
      # fake features should always reset
      assert metric.fake_features_num_samples == 0
  
      if reset_real_features:
          assert metric.real_features_num_samples == 0
      else:
          assert metric.real_features_num_samples == 2
          assert metric.real_features_sum.shape == torch.Size([64])
          assert metric.real_features_cov_sum.shape == torch.Size(
              [64, 64]
          )
  
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 7 for calling a global function with example usage: test_reset_real_features_arg(reset_real_features) without return types