code: def test_formatting_with_objects():
      class Stringable(object):
          def __unicode__(self):
              return "строка"
  
          if PY2:
  
              def __str__(self):
                  return "some other value"
  
          else:
              __str__ = __unicode__
  
      assert Markup("{s}").format(s=Stringable()) == Markup("строка")
  
imports: import pytest
  from markupsafe import escape
  from markupsafe import escape_silent
  from markupsafe import Markup
  from markupsafe._compat import PY2
  from markupsafe._compat import text_type
label_desc: Use image node_id 13 for calling a global function with example usage: test_formatting_with_objects() and returns: str, str