code: def test_echo(self, _, echo, echo_index, output_index):
      # The empty lines below are part of the test. Do not remove them.
      with echo():
          st.write("Hello")
  
          "hi"
  
          def foo(x):
              y = x + 10
  
              print(y)
  
          class MyClass(object):
              def do_x(self):
                  pass
  
              def do_y(self):
                  pass
  
      echo_str = """st.write("Hello")
  
  "hi"
  
  def foo(x):
      y = x + 10
  
      print(y)
  
  class MyClass(object):
      def do_x(self):
          pass
  
      def do_y(self):
          pass"""
  
      element = self.get_delta_from_queue(echo_index).new_element
      self.assertEqual(echo_str, element.code.code_text)
  
      element = self.get_delta_from_queue(output_index).new_element
      self.assertEqual("Hello", element.markdown.body)
  
      self.clear_queue()
  
file_path: streamlit/lib/tests/streamlit/elements/echo_test.py
imports: from parameterized import parameterized
  import streamlit
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 1 for calling the EchoTest obj's underlying member method code with example usage: obj.test_echo(_, echo, echo_index, output_index) without return types