input: Write a python function to escape a given string for XML, ensuring compatibility with Google's internal Translation Console tool.
  assert _XmlEscape("This & that") == b'This &amp; that'
  assert _XmlEscape('"Double Quotes" & <Single Quotes>') == b'&quot;Double Quotes&quot; &amp; &lt;Single Quotes&gt;'
  assert _XmlEscape("Control\x00Chars\x19Here") == b'ControlCharsHere'
output: def _XmlEscape(s):
      escape_dict = {
          '&': '&amp;',
          '"': '&quot;',
          '<': '&lt;',
          '>': '&gt;',
          "'": '&apos;'
      }
      
      def replace_char(c):
          if c in escape_dict:
              return escape_dict[c]
          elif ord(c) < 0x20 and c not in ('\t', '\n', '\r'):
              return ''
          else:
              return c
  
      escaped = ''.join(replace_char(c) for c in s)
      return escaped.encode('utf-8')