def ParseOptions(cls, options, output_module):
    """Parses and validates options.

    Args:
      options (argparse.Namespace): parser options.
      output_module (OutputModule): output module to configure.

    Raises:
      BadConfigObject: when the output module object is of the wrong type.
    """
    if not isinstance(output_module, mysql_4n6time.MySQL4n6TimeOutputModule):
      raise errors.BadConfigObject(
          'Output module is not an instance of MySQL4n6TimeOutputModule')

    MySQL4n6TimeDatabaseArgumentsHelper.ParseOptions(options, output_module)
    shared_4n6time_output.Shared4n6TimeOutputArgumentsHelper.ParseOptions(
        options, output_module)