def check_hierarchy(rdf, break_cycles, keep_related, mark_top_concepts,<EOL>eliminate_redundancy):
starttime = time.time()<EOL>if check.hierarchy_cycles(rdf, break_cycles):<EOL><INDENT>logging.info(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>setup_top_concepts(rdf, mark_top_concepts)<EOL><DEDENT>check.disjoint_relations(rdf, not keep_related)<EOL>check.hierarchical_redundancy(rdf, eliminate_redundancy)<EOL>endtime = time.time()<EOL>logging.debug("<STR_LIT>", (endtime - starttime))<EOL>
Check for, and optionally fix, problems in the skos:broader hierarchy
    using a recursive depth first search algorithm.

    :param Graph rdf: An rdflib.graph.Graph object.
    :param bool fix_cycles: Break cycles.
    :param bool fix_disjoint_relations: Remoe skos:related overlapping with
        skos:broaderTransitive.
    :param bool fix_redundancy: Remove skos:broader between two concepts otherwise
        connected by skos:broaderTransitive.