code: def test_to_mx_ndarray():
      # scalar
      assert to_mx_ndarray(1.2) == nd.array([1.2])
      # list of one scalar
      assert to_mx_ndarray([1.2]) == [nd.array([1.2])]
      # list of multiple scalars
      assert to_mx_ndarray([1.2, 3.4]) == [
          nd.array([1.2]),
          nd.array([3.4]),
      ]
      # list of lists of scalars
      assert to_mx_ndarray([[1.2], [3.4]]) == [
          [nd.array([1.2])],
          [nd.array([3.4])],
      ]
      # numpy
      assert np.array_equal(
          to_mx_ndarray(np.array([[1.2], [3.4]])).asnumpy(),
          nd.array([[1.2], [3.4]]).asnumpy(),
      )
      # tuple
      assert to_mx_ndarray(((1.2,), (3.4,))) == (
          (nd.array([1.2]),),
          (nd.array([3.4]),),
      )
  
imports: import pytest
  import mxnet
  from mxnet import nd
  import numpy
  from rl_coach.architectures.mxnet_components.utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: test_to_mx_ndarray() without return types