code: def test_pat021_patch_iter():
      p = Patch()
  
      with pytest.raises(TypeError):
          for _ in p["invalid"]:
              print("invalid iteration")
  
imports: import json
  import pytest
  from dash import Patch
  from dash._utils import to_json
label_desc: Use image node_id 22 for calling a global function with example usage: test_pat021_patch_iter() without return types