'Invincible star collisions along y axis'

def check_star_y_collisions(self, star):

    collider = pg.sprite.spritecollideany(star, self.ground_step_pipe_group)
    brick = pg.sprite.spritecollideany(star, self.brick_group)
    coin_box = pg.sprite.spritecollideany(star, self.coin_box_group)
    if collider:
        self.adjust_star_for_collision_y(star, collider)
    elif brick:
        self.adjust_star_for_collision_y(star, brick)
    elif coin_box:
        self.adjust_star_for_collision_y(star, coin_box)
