get_children() returns an array of the child nodes, not an integer.
I believe you can just do this:
for child in lines.get_children():
ray_col_check(child)
If you for some reason need an integer, use get_child_count() instead
for i in lines.get_child_count():
ray_col_check(lines.get_child(i))