code: def readable_fqdn():
      # May raise `UnicodeDecodeError` for non-ASCII hostnames:
      # https://github.com/tensorflow/tensorboard/issues/682
      try:
          logging.info("socket.getfqdn(): %r", socket.getfqdn())
      except UnicodeDecodeError as e:
          try:
              binary_hostname = subprocess.check_output(
                  ["hostname"]
              ).strip()
          except subprocess.CalledProcessError:
              binary_hostname = b"<unavailable>"
          is_non_ascii = not all(
              0x20
              <= (ord(c) if not isinstance(c, int) else c)
              <= 0x7E  # Python 2
              for c in binary_hostname
          )
          if is_non_ascii:
              message = reflow(
                  """
                  Your computer's hostname, %r, contains bytes outside of the
                  printable ASCII range. Some versions of Python have trouble
                  working with such names (https://bugs.python.org/issue26227).
                  Consider changing to a hostname that only contains printable
                  ASCII bytes.
                  """
                  % (binary_hostname,)
              )
              yield Suggestion("Use an ASCII hostname", message)
          else:
              message = reflow(
                  """
                  Python can't read your computer's hostname, %r. This can occur
                  if the hostname contains non-ASCII bytes
                  (https://bugs.python.org/issue26227). Consider changing your
                  hostname, rebooting your machine, and rerunning this diagnosis
                  script to see if the problem is resolved.
                  """
                  % (binary_hostname,)
              )
              yield Suggestion("Use a simpler hostname", message)
          raise e
  
imports: import dataclasses
  import errno
  import functools
  import hashlib
  import inspect
  import logging
  import os
  import pipes
  import shlex
  import socket
  import subprocess
  import sys
  import tempfile
  import textwrap
  import traceback
label_desc: Use image node_id 15 for calling a global function with example usage: readable_fqdn() without return types