I think i tried with 2021.1.3 at some point also, no success.
Out of despair, I added a python function definition in a code block before experiment, as you proposed for the javascript version :
def asarray(something):
return(something)
and it works for me. So definitely these calls to asarray() seem to serve no use.