def METHOD_NAME(graph):
    """Generate detailed resolve failure messages from graph
    Args:
        graph (rez.vendor.pygraph.classes.digraph.digraph): context graph object
    """
    # Base on `rez.solver._ResolvePhase.get_graph()`
    #   the failure reason has three types:
    #
    #   * DependencyConflicts
    #       which have "conflict" edge in graph
    #
    #   * TotalReduction
    #       which have "conflict" edge and may also have "reduct" edge in graph
    #
    #   * Cycle
    #       which have "cycle" edge in graph
    #
    #   so we find cycle edge first, and try other if not found.
    #
    # find cycle
    cycled_edge = next((k for k, v in graph.edge_properties.items()
                        if v["label"] == "CYCLE"), None)
    if cycled_edge:
        return _cycled_detail_from_graph(graph, cycled_edge)
    # find conflict
    conflicted_edge = next((k for k, v in graph.edge_properties.items()
                            if v["label"] == "CONFLICT"), None)
    if conflicted_edge:
        return _conflicted_detail_from_graph(graph, conflicted_edge)
    # should be a healthy graph
    return ""