code: def test_metric():
      def script():
          import streamlit as st
  
          st.metric("stonks", value=9500, delta=1000)
  
      at = AppTest.from_function(script).run()
      m = at.metric[0]
      assert m.value == "9500"
      assert m.delta == "1000"
  
      repr(m)
  
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 23 for calling a global function with example usage: test_metric() without return types