code: def test_chat_manager():
      agent1 = autogen.ConversableAgent(
          "alice",
          max_consecutive_auto_reply=2,
          human_input_mode="NEVER",
          llm_config=False,
          default_auto_reply="This is alice speaking.",
      )
      agent2 = autogen.ConversableAgent(
          "bob",
          max_consecutive_auto_reply=2,
          human_input_mode="NEVER",
          llm_config=False,
          default_auto_reply="This is bob speaking.",
      )
      groupchat = autogen.GroupChat(
          agents=[agent1, agent2], messages=[], max_round=2
      )
      group_chat_manager = autogen.GroupChatManager(
          groupchat=groupchat, llm_config=False
      )
      agent1.initiate_chat(group_chat_manager, message="hello")
  
      assert len(agent1.chat_messages[group_chat_manager]) == 2
      assert len(groupchat.messages) == 2
  
      group_chat_manager.reset()
      assert len(groupchat.messages) == 0
      agent1.reset()
      agent2.reset()
      agent2.initiate_chat(group_chat_manager, message="hello")
      assert len(groupchat.messages) == 2
  
      with pytest.raises(ValueError):
          agent2.initiate_chat(
              group_chat_manager,
              message={
                  "function_call": {
                      "name": "func",
                      "arguments": '{"x": 1}',
                  }
              },
          )
  
file_path: autogen/test/agentchat/test_groupchat.py
imports: import pytest
  from unittest import mock
  import builtins
  import autogen
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: test_chat_manager() without return types