code: def test_zero_div():
      acc = TopKCategoricalAccuracy(2)
      with pytest.raises(
          NotComputableError,
          match=r"TopKCategoricalAccuracy must have at least one example before it can be computed",
      ):
          acc.compute()
  
file_path: ignite/tests/ignite/metrics/test_top_k_categorical_accuracy.py
imports: import os
  import pytest
  import torch
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics import TopKCategoricalAccuracy
label_desc: Use image node_id 1 for calling a global function with example usage: test_zero_div() without return types