code: def pytest_raise_or_nothing(exception_or_any: Any):
      if isinstance(exception_or_any, type) and issubclass(
          exception_or_any, Exception
      ):
          with pytest.raises(exception_or_any):
              yield
      else:
          yield
  
file_path: espnet/test/espnet2/utils/test_types.py
imports: from contextlib import contextmanager
  from typing import Any
  import pytest
  from espnet2.utils.types import float_or_none, humanfriendly_parse_size_or_none, int_or_none, remove_parenthesis, str2bool, str2pair_str, str2triple_str, str_or_int, str_or_none
label_desc: Use image node_id 1 for calling a global function with example usage: pytest_raise_or_nothing(exception_or_any) without return types