'Checks if mario is crouching'

def check_if_crouching(self):

    if (self.crouching and self.big):
        bottom = self.rect.bottom
        left = self.rect.x
        if self.facing_right:
            self.image = self.right_frames[7]
        else:
            self.image = self.left_frames[7]
        self.rect = self.image.get_rect()
        self.rect.bottom = bottom
        self.rect.x = left
