code: def escape(self, obj, mapping=None):
          
          if isinstance(obj, str_type):
              return "'" + self.escape_string(obj) + "'"
          if isinstance(obj, (bytes, bytearray)):
              ret = self._quote_bytes(obj)
              if self._binary_prefix:
                  ret = "_binary" + ret
              return ret
          return converters.escape_item(obj, self.charset, mapping=mapping)
docs: Escape whatever value you pass to it.
  
          Non-standard, for internal use; do not use this in your applications.