code: def enable_shape_checks() -> Iterable[None]:
      # Ensure that:
      # 1: `check_shapes` is enabled when running these tests.
      # 2: If a test manipulates `check_shapes` settings, they are reset after the test.
      # See also: tests/conftest.py
      old_enable = get_enable_check_shapes()
      old_rewrite_docstrings = get_rewrite_docstrings()
      old_function_call_precompute = (
          get_enable_function_call_precompute()
      )
      set_enable_check_shapes(ShapeCheckingState.ENABLED)
      set_rewrite_docstrings(DocstringFormat.SPHINX)
      set_enable_function_call_precompute(True)
      yield
      set_enable_function_call_precompute(old_function_call_precompute)
      set_rewrite_docstrings(old_rewrite_docstrings)
      set_enable_check_shapes(old_enable)
  
imports: from typing import Iterable
  import pytest
  from _pytest.logging import LogCaptureFixture
  from check_shapes.config import DocstringFormat, ShapeCheckingState, get_enable_check_shapes, get_enable_function_call_precompute, get_rewrite_docstrings, set_enable_check_shapes, set_enable_function_call_precompute, set_rewrite_docstrings
label_desc: Use image node_id 2 for calling a global function with example usage: enable_shape_checks() without return types