code: def _has_surrogates(s):
      """Return True if s contains 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 issue 11454 for timings.
      try:
          s.encode()
          return False
      except UnicodeEncodeError:
          return True
  
imports: import os
  import re
  import time
  import random
  import socket
  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
  from email.charset import Charset
label_desc: Use image node_id 1 for calling a global function with example usage: _has_surrogates(s) and returns: False, True