code: def _str_escape(text):
      result = ""
      for value in text:
          if value == "\n":
              result += "\\n"
          elif value == "\r":
              result += "\\r"
          elif value == "\t":
              result += "\\t"
          elif value == '"':
              result += '\\"'
          elif value == "'":
              result += "\\'"
          elif value == "\\":
              result += "\\\\"
          else:
              result += value
      return result
  
imports: import json
  import logging
  import os
  import google.protobuf
  from tensorflow.core.framework import api_def_pb2
  from tensorflow.core.framework import op_def_pb2
  from tensorflow.core.framework import types_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _str_escape(text) and returns: result