def METHOD_NAME(self):
    """Get the output format
    The priority is:
        * output_format set via flag
        * output_format set via config file
        * or the default format if missing.
    Returns:
        Output format as a string.
    """
    if self.output_format_from_flag:
        METHOD_NAME = self.output_format_from_flag
        self.config_assistant.set_config("output", METHOD_NAME)
        self.config_assistant.save_config()
        return METHOD_NAME
    try:
        METHOD_NAME = self.config_assistant.get_config("output")
    except KeyError:  # in case value does not exist in the config file
        self.config_assistant.set_config("output", DEFAULT_OUTPUT_FORMAT)
        self.config_assistant.save_config()
        METHOD_NAME = DEFAULT_OUTPUT_FORMAT
    return METHOD_NAME