docstr: Configure multiple outputs for multiple services
  Args:
      options (argparse.Namespace): Basically a namedtuple with the service setting
      config (StreamAlert.config): The configuration of StreamAlert
  Returns:
      bool: False if errors occurred, True otherwise
docstr_tok: ["Configure","multiple","outputs","for","multiple","services","Args",":","options","(","argparse.Namespace",")",":","Basically","a","namedtuple","with","the","service","setting","config","(","StreamAlert.config",")",":","The","configuration","of","StreamAlert","Returns",":","bool",":","False","if","errors","occurred",",","True","otherwise"]
code: def handler(cls, options, config):
      """Configure multiple outputs for multiple services
      Args:
          options (argparse.Namespace): Basically a namedtuple with the service setting
          config (StreamAlert.config): The configuration of StreamAlert
      Returns:
          bool: False if errors occurred, True otherwise
      """
      try:
          with open(options.file, "r") as json_file_fp:
              file_contents = json.load(json_file_fp)
      except Exception:  # pylint: disable=broad-except
          LOGGER.error("Error opening file %s", options.file)
          return False
  
      if not file_contents:
          LOGGER.error("File %s is empty", options.file)
          return False
  
      for service, configurations in file_contents.items():
          LOGGER.debug("Setting outputs for service %s", service)
          # Retrieve the proper service class to handle dispatching the alerts of this service
          output = StreamAlertOutput.get_dispatcher(service)
  
          for configuration in configurations:
              properties = cls.convert_configuration_to_properties(
                  configuration, output
              )
              if not properties:
                  # Configuration was not valid
                  return False
  
              if not options.update and output_exists(
                  config["outputs"], properties, service
              ):
                  # If the output already exists and update is not set
                  # return early
                  return False
  
              # For each configuration for this service, save the creds and update the config
              if not cls.save_credentials(service, config, properties):
                  return False
              cls.update_config(
                  options, config, properties, output, service
              )
  
          LOGGER.info(
              "Saved %s configurations for service: %s",
              len(configurations),
              service,
          )
  
      LOGGER.info(
          "Finished setting all configurations for services: %s",
          file_contents.keys(),
      )
      return True
  
imports: import json
  from streamalert.shared.logger import get_logger
  from streamalert.alert_processor.outputs.output_base import StreamAlertOutput, OutputCredentialsProvider
  from streamalert_cli.helpers import user_input, response_is_valid
  from streamalert_cli.outputs.helpers import output_exists
  from streamalert_cli.utils import CLICommand, generate_subparser
label_desc: Use image node_id 2 for calling the OutputSetFromFileSubCommand obj's underlying member method code with example usage: obj.handler(cls, options, config) and returns: True, False, False, False, False, False