code: def test_string_representations_of_simple_object():
      obj = _disp_spamegg
      assert repr(obj).startswith("H2ODisplayWrapper")
      assert (
          str(obj)
          == obj.to_str()
          == obj.to_str("full")
          == "spam & eggs"
      )
      assert (
          obj.to_pretty_str()
          == obj.to_pretty_str("full")
          == "No spam, just eggs please"
      )
      assert (
          obj.to_html()
          == obj.to_html("full")
          == "<spam>and eggs</spam>"
      )
      assert obj.to_str("short") == "s & e"
      assert obj.to_pretty_str("short") == "No"
      assert obj.to_html("short") == "<s>+e</s>"
  
imports: import sys
  from h2o.display import H2ODisplay, H2ODisplayWrapper, H2OStringDisplay, H2OItemsDisplay
  from tests import pyunit_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_string_representations_of_simple_object() without return types