code: def check_monkeypatch_typeddict(monkeypatch: MonkeyPatch) -> None:
      from typing import TypedDict
  
      class Foo(TypedDict):
          x: int
          y: float
  
      a: Foo = {"x": 1, "y": 3.14}
      monkeypatch.setitem(a, "x", 2)
      monkeypatch.delitem(a, "y")
  
file_path: pytest/testing/typing_checks.py
imports: import contextlib
  from typing import Optional
  from typing_extensions import assert_type
  import pytest
  from pytest import MonkeyPatch
label_desc: Use image node_id 4 for calling a global function with example usage: check_monkeypatch_typeddict(monkeypatch) without return types