code: def test_dot():
      t1 = tensor([[0, 1, 0], [1, 0, 0]], chunk_size=2).tosparse()
      t2 = t1.T
  
      assert t1.dot(t2).issparse() is True
      assert type(t1.dot(t2)) is SparseTensor
      assert t1.dot(t2, sparse=False).issparse() is False
      assert type(t1.dot(t2, sparse=False)) is Tensor
  
      with pytest.raises(TypeError):
          dot(t1, t2, out=1)
  
      with pytest.raises(ValueError):
          dot(t1, t2, empty((3, 6)))
  
      with pytest.raises(ValueError):
          dot(t1, t2, empty((3, 3), dtype="i4"))
  
      with pytest.raises(ValueError):
          dot(t1, t2, empty((3, 3), order="F"))
  
      t1.dot(t2, out=empty((2, 2), dtype=t1.dtype))
  
file_path: mars/mars/tensor/linalg/tests/test_linalg.py
imports: import numpy
  import scipy.sparse
  import pytest
  from ....None import tensor
  from ....core import tile
  from ...None import ones, tensor, dot, empty
  from ...core import SparseTensor, Tensor
  from ..None import matmul
  from ..inv import TensorInv
label_desc: Use image node_id 8 for calling a global function with example usage: test_dot() without return types