code: def test_dummy_metric():
      with pytest.raises(
          ValueError,
          match=r"Argument num_features must be greater to zero, got:",
      ):
          DummyInceptionMetric(
              num_features=-1, feature_extractor=torch.nn.Identity()
          ).update(torch.rand(2, 0))
  
      with pytest.raises(
          ValueError,
          match=r"feature_extractor output must be a tensor of dim 2, got: 1",
      ):
          DummyInceptionMetric(
              num_features=1000, feature_extractor=torch.nn.Identity()
          ).update(torch.rand(3))
  
      with pytest.raises(
          ValueError,
          match=r"Batch size should be greater than one, got: 0",
      ):
          DummyInceptionMetric(
              num_features=1000, feature_extractor=torch.nn.Identity()
          ).update(torch.rand(0, 0))
  
      with pytest.raises(
          ValueError,
          match=r"num_features returned by feature_extractor should be 1000, got: 0",
      ):
          DummyInceptionMetric(
              num_features=1000, feature_extractor=torch.nn.Identity()
          ).update(torch.rand(2, 0))
  
      with pytest.raises(
          ValueError,
          match=r"Argument num_features must be provided, if feature_extractor is specified.",
      ):
          DummyInceptionMetric(feature_extractor=torch.nn.Identity())
  
      with pytest.raises(
          TypeError,
          match=r"Argument feature_extractor must be of type torch.nn.Module, got",
      ):
          DummyInceptionMetric(
              num_features=1000, feature_extractor=lambda x: x
          )
  
      assert isinstance(
          DummyInceptionMetric(num_features=10)._feature_extractor,
          torch.nn.Identity,
      )
  
file_path: ignite/tests/ignite/metrics/gan/test_utils.py
imports: from typing import Callable, Optional, Union
  from unittest.mock import patch
  import pytest
  import torch
  import torchvision
  from ignite.metrics.gan.utils import _BaseInceptionMetric, InceptionModel
label_desc: Use image node_id 1 for calling a global function with example usage: test_dummy_metric() without return types