<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_causal_link(self, direction, mechanism, purviews=False, allow_neg=False):
 """Return the maximally irreducible cause or effect ratio for a mechanism. Args: direction (str):
 The temporal direction, specifying cause or effect. mechanism (tuple[int]):
 The mechanism to be tested for irreducibility. Keyword Args: purviews (tuple[int]):
 Optionally restrict the possible purviews to a subset of the subsystem. This may be useful for _e.g._ finding only concepts that are "about" a certain subset of nodes. Returns: CausalLink: The maximally-irreducible actual cause or effect. """

        purviews = self.potential_purviews(direction, mechanism, purviews)

        # Find the maximal RIA over the remaining purviews.
        if not purviews:
            max_ria = _null_ac_ria(self.mechanism_state(direction),
                                   direction, mechanism, None)
        else:
            # This max should be most positive
            max_ria = max(self.find_mip(direction, mechanism, purview,
                                        allow_neg)
                          for purview in purviews)

        # Construct the corresponding CausalLink
        return CausalLink(max_ria)