code: def test_items_string_representations_of_complex_object():
      items = H2OItemsDisplay(
          [
              "first line",
              "second line",
              _disp_constant,
              "a line in between",
              "another line in between",
              _disp_spamegg,
              _disp_spamegg,
              "last line",
          ]
      )
      assert (
          str(items)
          == items.to_str()
          == """
  first line
  second line
  
  never changes
  
  a line in between
  another line in between
  
  spam & eggs
  
  spam & eggs
  
  last line
  """.strip()
      )  # notice the new lines around non raw strings, creating paragraphs
  
      assert (
          items.to_pretty_str()
          == """
  first line
  second line
  
  never changes
  
  a line in between
  another line in between
  
  No spam, just eggs please
  
  No spam, just eggs please
  
  last line
  """.strip()
      )
  
      assert (
          items.to_html()
          == """
  <pre style='margin: 1em 0 1em 0;'>first line
  second line</pre>
  <div style='margin: 1em 0 1em 0;'>never changes</div>
  <pre style='margin: 1em 0 1em 0;'>a line in between
  another line in between</pre>
  <div style='margin: 1em 0 1em 0;'><spam>and eggs</spam></div>
  <div style='margin: 1em 0 1em 0;'><spam>and eggs</spam></div>
  <pre style='margin: 1em 0 1em 0;'>last line</pre>
  """.strip()
      )
  
imports: import sys
  from h2o.display import H2ODisplay, H2ODisplayWrapper, H2OStringDisplay, H2OItemsDisplay
  from tests import pyunit_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_items_string_representations_of_complex_object() without return types