<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def crop_to_sheet(self,sheet_coord_system):
        "Crop the slice to the SheetCoordinateSystem's bounds."
        maxrow,maxcol = sheet_coord_system.shape

        self[0] = max(0,self[0])
        self[1] = min(maxrow,self[1])
        self[2] = max(0,self[2])
        self[3] = min(maxcol,self[3])