code: def test_check_tile_db():
      ctx = tiledb.Ctx()
  
      tempdir = tempfile.mkdtemp()
      try:
          np_a = np.random.rand(2, 3)
          tiledb_a = tiledb.DenseArray.from_numpy(
              ctx=ctx, uri=tempdir, array=np_a
          )
  
          with pytest.raises(ValueError):
              # ndim not match
              check_tiledb_array_with_tensor(
                  random.rand(2, 3, 4), tiledb_a
              )
  
          with pytest.raises(ValueError):
              # shape not matchn
              check_tiledb_array_with_tensor(
                  random.rand(2, 4), tiledb_a
              )
  
          with pytest.raises(ValueError):
              # dtype not match
              check_tiledb_array_with_tensor(
                  random.rand(2, 3, dtype=np.float32), tiledb_a
              )
  
          # legal
          check_tiledb_array_with_tensor(random.rand(2, 3), tiledb_a)
      finally:
          shutil.rmtree(tempdir)
  
file_path: mars/mars/tensor/datastore/tests/test_datastore.py
imports: import shutil
  import tempfile
  import numpy
  import pytest
  from ....core import tile
  from ...None import random
  from ..None import totiledb
  from ..utils import get_tiledb_schema_from_tensor, check_tiledb_array_with_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_tile_db() without return types