code: def test_store_tile_db():
      ctx = tiledb.Ctx()
      tempdir = tempfile.mkdtemp()
      try:
          t = random.rand(50, 30, chunk_size=13)
          t2 = t + 1
  
          saved = totiledb(tempdir, t2)
          assert saved.shape == (0, 0)
          assert saved.op.tiledb_config is None
          assert saved.op.tiledb_uri == tempdir
  
          with pytest.raises(tiledb.TileDBError):
              tiledb.DenseArray(ctx=ctx, uri=tempdir)
  
          # tiledb array is created in the tile
          saved = tile(saved)
  
          # no error
          tiledb.DenseArray(ctx=ctx, uri=tempdir)
  
          # TileDB consolidation
          assert len(saved.chunks) == 1
  
          assert saved.chunks[0].inputs[0].op.axis_offsets == (0, 0)
          assert saved.chunks[0].inputs[1].op.axis_offsets == (0, 13)
          assert saved.chunks[0].inputs[2].op.axis_offsets == (
              0,
              26,
          )  # input (0, 2)
          assert saved.chunks[0].inputs[5].op.axis_offsets == (
              13,
              26,
          )  # input (1, 2)
          assert saved.chunks[0].inputs[11].op.axis_offsets == (
              39,
              26,
          )  # input (3, 2)
  
          with pytest.raises(ValueError):
              t3 = random.rand(30, 50)
              totiledb(tempdir, t3, ctx=ctx)  # shape incompatible
      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 3 for calling a global function with example usage: test_store_tile_db() without return types