<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mechanism_indices(self, direction):
 """The indices of nodes in the mechanism system."""

        return {
            Direction.CAUSE: self.effect_indices,
            Direction.EFFECT: self.cause_indices
        }[direction]