code: def ParseOptions(cls, options, output_module):
      
      if not hasattr(output_module, 'SetCredentials'):
        raise errors.BadConfigObject('Unable to set username information.')
  
      if not hasattr(output_module, 'SetDatabaseName'):
        raise errors.BadConfigObject('Unable to set database information.')
  
      username = cls._ParseStringOption(
          options, 'username', default_value=cls._DEFAULT_USERNAME)
      password = cls._ParseStringOption(
          options, 'password', default_value=cls._DEFAULT_PASSWORD)
      name = cls._ParseStringOption(
          options, 'db_name', default_value=cls._DEFAULT_NAME)
  
      output_module.SetCredentials(username=username, password=password)
      output_module.SetDatabaseName(name)
      server_config.ServerArgumentsHelper.ParseOptions(options, output_module)
docs: Parses and validates options.
  
      Args:
        options (argparse.Namespace): parser options.
        output_module (OutputModule): output module to configure.
  
      Raises:
        BadConfigObject: when the output module object does not have the
            SetCredentials or SetDatabaseName methods.