<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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))