code: def test_pat002_patch_assign_attr():
      p = Patch()
      p.item = "assigned"
  
      data = patch_to_dict(p)
  
      assert data["operations"][0] == {
          "operation": "Assign",
          "location": ["item"],
          "params": {"value": "assigned"},
      }
  
imports: import json
  import pytest
  from dash import Patch
  from dash._utils import to_json
label_desc: Use image node_id 3 for calling a global function with example usage: test_pat002_patch_assign_attr() without return types