code: def test_chat():
      def script():
          import streamlit as st
  
          input = st.chat_input(placeholder="Type a thing")
          with st.chat_message("user"):
              st.write(input)
  
      at = AppTest.from_function(script).run()
      assert at.chat_input[0].value == None
      msg = at.chat_message[0]
      assert msg.name == "user"
      assert msg.markdown[0].value == "`None`"
  
      at.chat_input[0].set_value("hi").run()
      assert at.chat_input[0].value == "hi"
      assert at.chat_message[0].markdown[0].value == "hi"
  
      # verify value resets after use
      at.run()
      assert at.chat_input[0].value == None
  
      # verify reprs
      repr(at.chat_input[0])
      repr(at.chat_message[0])
  
imports: from datetime import date, datetime, time
  import numpy
  import pandas
  import pytest
  from streamlit.elements.markdown import MARKDOWN_HORIZONTAL_RULE_EXPRESSION
  from streamlit.testing.v1.app_test import AppTest
label_desc: Use image node_id 3 for calling a global function with example usage: test_chat() without return types