<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replace(self, child, replacement):
 """Replace a child chunk with something else."""

        for i in range(len(self.chunks)):
            if self.chunks[i] == child:
                self.chunks[i] = replacement