code: def stat_tensorboardinfo():
      # We don't use `manager._get_info_dir`, because (a) that requires
      # TensorBoard, and (b) that creates the directory if it doesn't exist.
      path = os.path.join(tempfile.gettempdir(), ".tensorboard-info")
      logging.info("directory: %s", path)
      try:
          stat_result = os.stat(path)
      except OSError as e:
          if e.errno == errno.ENOENT:
              # No problem; this is just fine.
              logging.info(".tensorboard-info directory does not exist")
              return
          else:
              raise
      logging.info("os.stat(...): %r", stat_result)
      logging.info("mode: 0o%o", stat_result.st_mode)
      if stat_result.st_mode & 0o777 != 0o777:
          preamble = reflow(
              """
              The ".tensorboard-info" directory was created by an old version
              of TensorBoard, and its permissions are not set correctly; see
              issue #2010. Change that directory to be world-accessible (may
              require superuser privilege):
              """
          )
          # This error should only appear on Unices, so it's okay to use
          # Unix-specific utilities and shell syntax.
          quote = (
              getattr(shlex, "quote", None) or pipes.quote
          )  # Python <3.3
          command = "chmod 777 %s" % quote(path)
          message = "%s\n\n\t%s" % (preamble, command)
          yield Suggestion('Fix permissions on "%s"' % path, message)
  
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 16 for calling a global function with example usage: stat_tensorboardinfo() without return types