code: def escape(s):
      """Replace the characters ``&``, ``<``, ``>``, ``'``, and ``"`` in
      the string with HTML-safe sequences. Use this if you need to display
      text that might contain such characters in HTML.
  
      If the object has an ``__html__`` method, it is called and the
      return value is assumed to already be safe for HTML.
  
      :param s: An object to be converted to a string and escaped.
      :return: A :class:`Markup` string with the escaped text.
      """
      if hasattr(s, "__html__"):
          return Markup(s.__html__())
      return Markup(
          text_type(s)
          .replace("&", "&amp;")
          .replace(">", "&gt;")
          .replace("<", "&lt;")
          .replace("'", "&#39;")
          .replace('"', "&#34;")
      )
  
imports: from .None import Markup
  from ._compat import text_type
label_desc: Use image node_id 1 for calling a global function with example usage: escape(s) and returns: Markup, Markup