Why doesn't it work? Please help to fix

collision event

def on_fire_collision(other):
print(f"{other.name} is touched")

if other == wall:
    other.appearance.color = Color.Black  # it won't work

fire.physics.enabled = True
fire.physics.type = “Kinematic”
fire.physics.gravity = False
fire.physics.friction = 0

fire.on_collision_enter(on_fire_collision)
#fire.physics.on_collision_enter(on_fire_collision)

for dy in range(50):
fire.transition.move_to(Vector3(0, -7.5-dy, 0), 180)