code: def escape_special_symbols(strval):
      encoding_needed = _Formatting.encoding_needed(strval)
      c_str = strval.encode("utf-8") if encoding_needed else strval
      retval = b""
      for c in c_str:
          c = bytes([c])
          if c in (b"\\", b'"'):
              retval += b"\\" + c
          elif ord(c) < ord(" "):
              retval += c.decode("latin-1").encode("unicode_escape")
          else:
              retval += c
      return retval.decode("utf-8") if encoding_needed else retval
  
imports: import base64
  import json
  import os
  import re
  import sys
  import shutil
  import tempfile
  import textwrap
  import zipfile
label_desc: Use image node_id 3 for calling the _Formatting obj's underlying member method code with example usage: obj.escape_special_symbols(strval) and returns: unknown