<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_num_similar_rows(self, row, until=None):
 """Get the number of rows similar to row which precede the index `until`"""

        return len(list(filter(lambda r: row == r, self.dataset[:until])))