<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _make_carpet(self, rescale_data):
 """ Constructs the carpet from the input image. Optional rescaling of the data. """


        self.carpet = self._unroll_array(self.input_image, self.fixed_dim)
        if rescale_data:
            self.carpet = row_wise_rescale(self.carpet)