$ doesn't make sense in an inner class, because
$ really is a shortcut for
get_node is a function inherited in
Node. So you can't use
$ unless your inner class is also a node, I wonder if that's possible though, never tested that.
$ literally in place of
get_node when calling it from a node variable... I don't think it's supposed to work. You could go ahead and just write
test.get_node("Label").text instead. Maybe it could work if
test is a node present in the tree though.