code: def print_dict(d, show_missing=True):
      """Prints a shallow dict to console.
  
      Args:
        d: Dict to print.
        show_missing: Whether to show keys with empty values.
      """
      for k, v in sorted(d.items()):
          if (not v) and show_missing:
              # No instances of the key, so print missing symbol.
              print("{} -".format(k))
          elif isinstance(v, list):
              # Value is a list, so print each item of the list.
              print(k)
              for item in v:
                  print("   {}".format(item))
          elif isinstance(v, dict):
              # Value is a dict, so print each (key, value) pair of the dict.
              print(k)
              for kk, vv in sorted(v.items()):
                  print("   {:<20} {}".format(kk, vv))
  
file_path: tensorboard/tensorboard/backend/event_processing/event_file_inspector.py
imports: import dataclasses
  import itertools
  import os
  from typing import Any, Generator, Mapping
  from tensorboard.backend.event_processing import event_accumulator
  from tensorboard.backend.event_processing import event_file_loader
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.compat import tf
  from tensorboard.compat.proto import event_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: print_dict(d, show_missing) without return types