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

        if value > 0 and value % 16 == 0:
            self._num_disp = value
        else:
            raise InvalidNumDisparitiesError("numDisparities must be a "
                                             "positive integer evenly "
                                             "divisible by 16.")
        self._replace_bm()