code: def test_date_input():
      def script():
          import datetime
  
          import streamlit as st
  
          st.date_input("date", value=datetime.date(2023, 4, 17))
          st.date_input(
              "datetime", value=datetime.datetime(2023, 4, 17, 11)
          )
          st.date_input(
              "range",
              value=(
                  datetime.date(2020, 1, 1),
                  datetime.date(2030, 1, 1),
              ),
          )
  
      at = AppTest.from_function(script).run()
      assert not at.exception
      assert at.date_input.values == [
          date(2023, 4, 17),
          datetime(2023, 4, 17).date(),
          (date(2020, 1, 1), date(2030, 1, 1)),
      ]
      ds = at.date_input
      ds[0].set_value(date(2023, 5, 1))
      ds[1].set_value(datetime(2023, 1, 1))
      ds[2].set_value((date(2023, 1, 1), date(2024, 1, 1)))
  
      at.run()
      assert at.date_input.values == [
          date(2023, 5, 1),
          date(2023, 1, 1),
          (date(2023, 1, 1), date(2024, 1, 1)),
      ]
  
      # Verify that creating the reprs does not throw
      repr(at.date_input[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 8 for calling a global function with example usage: test_date_input() without return types