code: def escape(data, entities={}):
      """Escape &, <, and > in a string of data.
  
      You can escape other strings of data by passing a dictionary as
      the optional entities parameter.  The keys and values must all be
      strings; each key will be replaced with its corresponding value.
      """
  
      # must do ampersand first
      data = data.replace("&", "&amp;")
      data = data.replace(">", "&gt;")
      data = data.replace("<", "&lt;")
      if entities:
          data = __dict_replace(data, entities)
      return data
  
imports: import os, urllib.parse, urllib.request
  import io
  import codecs
  from .None import handler
  from .None import xmlreader
label_desc: Use image node_id 2 for calling a global function with example usage: escape(data, entities) and returns: data