'Mushroom collisions along the y axis'

def check_mushroom_y_collisions(self, mushroom):

    collider = pg.sprite.spritecollideany(mushroom, self.ground_step_pipe_group)
    brick = pg.sprite.spritecollideany(mushroom, self.brick_group)
    coin_box = pg.sprite.spritecollideany(mushroom, self.coin_box_group)
    if collider:
        self.adjust_mushroom_for_collision_y(mushroom, collider)
    elif brick:
        self.adjust_mushroom_for_collision_y(mushroom, brick)
    elif coin_box:
        self.adjust_mushroom_for_collision_y(mushroom, coin_box)
    else:
        self.check_if_falling(mushroom, self.ground_step_pipe_group)
        self.check_if_falling(mushroom, self.brick_group)
        self.check_if_falling(mushroom, self.coin_box_group)
