code: def test_renders_chat_messages_correctly_1(
      themed_app: Page, assert_snapshot: ImageCompareFunction
  ):
      """Test if the chat messages render correctly"""
      # Wait a bit more to allow all images to load:
      chat_message_elements = themed_app.locator(".stChatMessage")
      expect(chat_message_elements).to_have_count(12)
  
      # rerun to populate session state chat message
      themed_app.keyboard.press("r")
      wait_for_app_run(themed_app, wait_delay=1000)
      expect(chat_message_elements).to_have_count(14)
      for i, element in enumerate(chat_message_elements.all()):
          element.scroll_into_view_if_needed()
          # Wait a bit more to allow the avatar images to load:
          themed_app.wait_for_timeout(100)
          assert_snapshot(element, name=f"chat_message-{i}")
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_renders_chat_messages_correctly_1(themed_app, assert_snapshot) without return types