code: def test_check_compute_fn():
      def compute_fn(y_preds, y_targets):
          raise Exception
  
      em = EpochMetric(compute_fn, check_compute_fn=True)
  
      em.reset()
      output1 = (
          torch.rand(4, 3),
          torch.randint(0, 2, size=(4, 3), dtype=torch.long),
      )
      with pytest.warns(
          EpochMetricWarning,
          match=r"Probably, there can be a problem with `compute_fn`",
      ):
          em.update(output1)
  
      em = EpochMetric(compute_fn, check_compute_fn=False)
      em.update(output1)
  
file_path: ignite/tests/ignite/metrics/test_epoch_metric.py
imports: import pytest
  import torch
  import ignite.distributed
  from ignite.engine import Engine
  from ignite.metrics import EpochMetric
  from ignite.metrics.epoch_metric import EpochMetricWarning, NotComputableError
label_desc: Use image node_id 5 for calling a global function with example usage: test_check_compute_fn() without return types