code: def test_format():
      result = Markup("<em>{awesome}</em>").format(awesome="<awesome>")
      assert result == "<em>&lt;awesome&gt;</em>"
  
      result = Markup("{0[1][bar]}").format([0, {"bar": "<bar/>"}])
      assert result == "&lt;bar/&gt;"
  
      result = Markup("{0[1][bar]}").format(
          [0, {"bar": Markup("<bar/>")}]
      )
      assert result == "<bar/>"
  
imports: import pytest
  from markupsafe import Markup
label_desc: Use image node_id 10 for calling a global function with example usage: test_format() without return types