<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, line):
 """Delete all lines matching the given line."""

        nb = 0
        for block in self.blocks:
            nb += block.remove(line)

        return nb