code: def inspect(logdir='', event_file='', tag=''):
    
    print(PRINT_SEPARATOR +
          'Processing event files... (this can take a few minutes)\n' +
          PRINT_SEPARATOR)
    inspection_units = get_inspection_units(logdir, event_file, tag)
  
    for unit in inspection_units:
      if tag:
        print('Event statistics for tag {} in {}:'.format(tag, unit.name))
      else:
        # If the user is not inspecting a particular tag, also print the list of
        # all available tags that they can query.
        print('These tags are in {}:'.format(unit.name))
        print_dict(get_unique_tags(unit.field_to_obs))
        print(PRINT_SEPARATOR)
        print('Event statistics for {}:'.format(unit.name))
  
      print_dict(get_dict_to_print(unit.field_to_obs), show_missing=(not tag))
      print(PRINT_SEPARATOR)
docs: Main function for inspector that prints out a digest of event files.
  
    Args:
      logdir: A log directory that contains event files.
      event_file: Or, a particular event file path.
      tag: An optional tag name to query for.
  
    Raises:
      ValueError: If neither logdir and event_file are given, or both are given.