<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def P1(self, value):
 """Set private ``_P1`` and reset ``_block_matcher``."""

        if value < self.P2:
            self._P1 = value
        else:
            raise InvalidFirstDisparityChangePenaltyError("P1 must be less "
                                                          "than P2.")
        self._replace_bm()