code: def test_device_mismatch_cuda():
      p_yx = torch.rand(20, 10).to("cpu")
      m = InceptionScore(
          num_features=10,
          feature_extractor=torch.nn.Identity().to("cpu"),
          device="cuda",
      )
      m.update(p_yx)
      assert (
          pytest.approx(calculate_inception_score(p_yx)) == m.compute()
      )
  
file_path: ignite/tests/ignite/metrics/gan/test_inception_score.py
imports: import os
  import pytest
  import torch
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics.gan.inception_score import InceptionScore
label_desc: Use image node_id 3 for calling a global function with example usage: test_device_mismatch_cuda() without return types