<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def account(transition, direction=Direction.BIDIRECTIONAL):
 """Return the set of all causal links for a |Transition|. Args: transition (Transition):
 The transition of interest. Keyword Args: direction (Direction):
 By default the account contains actual causes and actual effects. """

    if direction != Direction.BIDIRECTIONAL:
        return directed_account(transition, direction)

    return Account(directed_account(transition, Direction.CAUSE) +
                   directed_account(transition, Direction.EFFECT))