def test_mixed_nesting_levels(self):
    pyarrow.from_pylist([1, 2, None])
    pyarrow.from_pylist([[1], [2], None])
    pyarrow.from_pylist([[1], [2], [None]])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([1, 2, [1]])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([1, 2, []])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([[1], [2], [None, [1]]])
def test_mixed_nesting_levels(self):
    pyarrow.from_pylist([1, 2, None])
    pyarrow.from_pylist([[1], [2], None])
    pyarrow.from_pylist([[1], [2], [None]])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([1, 2, [1]])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([1, 2, []])
    with self.assertRaises(pyarrow.ArrowException):
        pyarrow.from_pylist([[1], [2], [None, [1]]])