<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fmt_ac_ria(ria):
 """Format an AcRepertoireIrreducibilityAnalysis."""

    causality = {
        Direction.CAUSE: (fmt_mechanism(ria.purview, ria.node_labels),
                          ARROW_LEFT,
                          fmt_mechanism(ria.mechanism, ria.node_labels)),
        Direction.EFFECT: (fmt_mechanism(ria.mechanism, ria.node_labels),
                           ARROW_RIGHT,
                           fmt_mechanism(ria.purview, ria.node_labels))
    }[ria.direction]
    causality = ' '.join(causality)

    return '{ALPHA} = {alpha}  {causality}'.format(
        ALPHA=ALPHA,
        alpha=round(ria.alpha, 4),
        causality=causality)