Need help with scope

Godot Version

4.3

Question

(please be informed im really new to gdscript)
I am trying to play an idle animation on my games start, but after defining the animated sprite and calling a func to play it on game start it says “Parser Error: Identifier “amim” not declared in the current scope.”

show codes of the function.

you can play animated sprites whit .play("anim_name")

for example:
$AnimatedSprite.play("idle")