code: def fix_flags(self, flags):
      
      FlagsError = base_plugin.FlagsError
      if flags.version_tb:
        pass
      elif flags.inspect:
        if flags.logdir and flags.event_file:
          raise FlagsError(
              'Must specify either --logdir or --event_file, but not both.')
        if not (flags.logdir or flags.event_file):
          raise FlagsError('Must specify either --logdir or --event_file.')
      elif not flags.db and not flags.logdir:
        raise FlagsError('A logdir or db must be specified. '
                         'For example `tensorboard --logdir mylogdir` '
                         'or `tensorboard --db sqlite:~/.tensorboard.db`. '
                         'Run `tensorboard --helpfull` for details and examples.')
  
      if flags.path_prefix.endswith('/'):
        flags.path_prefix = flags.path_prefix[:-1]
docs: Fixes standard TensorBoard CLI flags to parser.