def test_unpack_invalid_input():
    with pytest.raises(TypeError):
        unpack("text")
def test_unpack_ndlist():
    x = [[
        1,
        2,
    ], [3, 4]]
    assert unpack(x) == [1, 2, 3, 4]
def test_unpack_2darray():
    x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
    assert unpack(x) == [1, 2, 3, 4, 5, 6]
def test_unpack_3darray():
    y = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]], [[9, 10], [11, 12]]])
    assert unpack(y) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
def test_unpack_1dlist():
    x = [1, 2]
    assert unpack(x) == [1, 2]