code: def _has_surrogates(s):
      """Return True if s may contain surrogate-escaped binary data."""
      # This check is based on the fact that unless there are surrogates, utf8
      # (Python's default encoding) can encode any string.  This is the fastest
      # way to check for surrogates, see bpo-11454 (moved to gh-55663) for timings.
      try:
          s.encode()
          return False
      except UnicodeEncodeError:
          return True
  
imports: import os
  import re
  import time
  import datetime
  import urllib.parse
  from email._parseaddr import quote
  from email._parseaddr import AddressList
  from email._parseaddr import mktime_tz
  from email._parseaddr import parsedate, parsedate_tz, _parsedate_tz
label_desc: Use image node_id 1 for calling a global function with example usage: _has_surrogates(s) and returns: False, True