code: def test__update_dict_from_chunk() -> None:
      # dictionaries and lists are not supported
      mock = MagicMock()
      empty_collections: List[Union[List[Any], Dict[str, Any]]] = [
          {},
          [],
      ]
      for c in empty_collections:
          mock.c = c
          with pytest.raises(NotImplementedError):
              OpenAIWrapper._update_dict_from_chunk(mock, {}, "c")
  
      org_d: Dict[str, Any] = {}
      for i, v in enumerate([0, 1, False, True, 0.0, 1.0]):
          field = "abcedfghijklmnopqrstuvwxyz"[i]
          setattr(mock, field, v)
  
          d = org_d.copy()
          OpenAIWrapper._update_dict_from_chunk(mock, d, field)
  
          org_d[field] = v
          assert d == org_d
  
      mock.s = "beginning"
      OpenAIWrapper._update_dict_from_chunk(mock, d, "s")
      assert d["s"] == "beginning"
  
      mock.s = " and"
      OpenAIWrapper._update_dict_from_chunk(mock, d, "s")
      assert d["s"] == "beginning and"
  
      mock.s = " end"
      OpenAIWrapper._update_dict_from_chunk(mock, d, "s")
      assert d["s"] == "beginning and end"
  
file_path: autogen/test/oai/test_client_stream.py
imports: import json
  from typing import Any, Dict, List, Literal, Optional, Union
  from unittest.mock import MagicMock
  import pytest
  from autogen import OpenAIWrapper, config_list_from_json, config_list_openai_aoai
  import sys
  import os
  from conftest import skip_openai
label_desc: Use image node_id 3 for calling a global function with example usage: test__update_dict_from_chunk() without return types