code: def test_normalize_arg(normalize):
      """Test that normalize argument works as expected."""
      img = torch.rand(2, 3, 299, 299)
      metric = FrechetInceptionDistance(normalize=normalize)
  
      context = (
          partial(
              pytest.raises,
              expected_exception=ValueError,
              match="Expecting image as torch.Tensor with dtype=torch.uint8",
          )
          if not normalize
          else does_not_raise
      )
  
      with context():
          metric.update(img, real=True)
  
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 8 for calling a global function with example usage: test_normalize_arg(normalize) without return types