code: def test_clear_for_call_stage(
      caplog: pytest.LogCaptureFixture,
      logging_during_setup_and_teardown: None,
  ) -> None:
      logger.info("a_call_log")
      assert [x.message for x in caplog.get_records("call")] == [
          "a_call_log"
      ]
      assert [x.message for x in caplog.get_records("setup")] == [
          "a_setup_log"
      ]
      caplog_records = caplog._item.stash[caplog_records_key]
      assert set(caplog_records) == {"setup", "call"}
  
      caplog.clear()
  
      assert caplog.get_records("call") == []
      assert [x.message for x in caplog.get_records("setup")] == [
          "a_setup_log"
      ]
      caplog_records = caplog._item.stash[caplog_records_key]
      assert set(caplog_records) == {"setup", "call"}
  
      logging.info("a_call_log_after_clear")
      assert [x.message for x in caplog.get_records("call")] == [
          "a_call_log_after_clear"
      ]
      assert [x.message for x in caplog.get_records("setup")] == [
          "a_setup_log"
      ]
      caplog_records = caplog._item.stash[caplog_records_key]
      assert set(caplog_records) == {"setup", "call"}
  
imports: import logging
  from typing import Iterator
  import pytest
  from _pytest.logging import caplog_records_key
  from _pytest.pytester import Pytester
label_desc: Use image node_id 19 for calling a global function with example usage: test_clear_for_call_stage(caplog, logging_during_setup_and_teardown) without return types