def save_output(output, output_file, indented=False):
    """Saves analysis output as json to output_path.

    :param output: Analysis output to be saved.
    :param output_file: Output file path.
    :param indented: Indentation of json file.
    :returns: Boolean whether file was saved succesfully.
    """
    with opened_w_error(output_file, 'w') as (f, err):
        if err:
            log.critical(str(err))
            log.critical(f'Output could not be saved in {output_file}.')
        else:
            if indented:
                json.dump(output, f, indent=4)
            else:
                json.dump(output, f)
            log.info(f'File saved succesfully to {output_file}.')
Saves analysis output as json to output_path.

    :param output: Analysis output to be saved.
    :param output_file: Output file path.
    :param indented: Indentation of json file.
    :returns: Boolean whether file was saved succesfully.
    
lisa/core/file_handling.py