<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cutout_data(self, x1, y1, x2, y2, xstep=1, ystep=1, astype=None):
 """cut out data area based on coords. """

        view = np.s_[y1:y2:ystep, x1:x2:xstep]
        data = self._slice(view)
        if astype:
            data = data.astype(astype, copy=False)
        return data