def check_summary_health(summary_file, **kwargs):
<EOL>fail_sensitive = kwargs.get("<STR_LIT>", [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>])<EOL>logger.debug("<STR_LIT>".format(fail_sensitive))<EOL>must_pass = kwargs.get("<STR_LIT>", [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>])<EOL>logger.debug("<STR_LIT>".format(must_pass))<EOL>warning_fail_sensitive = kwargs.get("<STR_LIT>", [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>])<EOL>warning_must_pass = kwargs.get("<STR_LIT>", [<EOL>"<STR_LIT>"<EOL>])<EOL>summary_info = get_summary(summary_file)<EOL>health = True<EOL>failed = []<EOL>warning = []<EOL>for cat, test in summary_info.items():<EOL><INDENT>logger.debug("<STR_LIT>".format(cat, test))<EOL>if cat in fail_sensitive and test == "<STR_LIT>":<EOL><INDENT>health = False<EOL>failed.append("<STR_LIT>".format(cat, test))<EOL>logger.error("<STR_LIT>"<EOL>"<STR_LIT>".format(cat))<EOL><DEDENT>if cat in must_pass and test != "<STR_LIT>":<EOL><INDENT>health = False<EOL>failed.append("<STR_LIT>".format(cat, test))<EOL>logger.error("<STR_LIT>".format(<EOL>cat))<EOL><DEDENT>if cat in warning_fail_sensitive and test == "<STR_LIT>":<EOL><INDENT>warning.append("<STR_LIT>".format(cat))<EOL>logger.warning("<STR_LIT>"<EOL>"<STR_LIT>".format(cat))<EOL><DEDENT>if cat in warning_must_pass and test != "<STR_LIT>":<EOL><INDENT>warning.append("<STR_LIT>".format(cat))<EOL>logger.warning("<STR_LIT>"<EOL>"<STR_LIT>".format(cat))<EOL><DEDENT><DEDENT>return health, failed, warning<EOL>
Checks the health of a sample from the FastQC summary file.

    Parses the FastQC summary file and tests whether the sample is good
    or not. There are four categories that cannot fail, and two that
    must pass in order for the sample pass this check. If the sample fails
    the quality checks, a list with the failing categories is also returned.

    Categories that cannot fail::

        fail_sensitive = [
            "Per base sequence quality",
            "Overrepresented sequences",
            "Sequence Length Distribution",
            "Per sequence GC content"
        ]

    Categories that must pass::

        must_pass = [
            "Per base N content",
            "Adapter Content"
        ]

    Parameters
    ----------
    summary_file: str
        Path to FastQC summary file.

    Returns
    -------
    x : bool
        Returns ``True`` if the sample passes all tests. ``False`` if not.
    summary_info : list
        A list with the FastQC categories that failed the tests. Is empty
        if the sample passes all tests.