code: def bin_xml_escape(arg):
      def repl(matchobj):
          i = ord(matchobj.group())
          if i <= 0xFF:
              return "#x%02X" % i
          else:
              return "#x%04X" % i
  
      return py.xml.raw(illegal_xml_re.sub(repl, py.xml.escape(arg)))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import platform
  import re
  import sys
  import time
  from datetime import datetime
  import py
  import six
  import pytest
  from _pytest import nodes
  from _pytest.config import filename_arg
label_desc: Use image node_id 1 for calling a global function with example usage: bin_xml_escape(arg) and returns: py, unknown, unknown