code: def test_squareform():
      assert distance.squareform(np.array([], dtype=float)).shape == (
          1,
          1,
      )
      assert distance.squareform(
          np.atleast_2d(np.random.rand())
      ).shape == (0,)
  
      with pytest.raises(ValueError):
          distance.squareform(np.random.rand(3, 3), force="tomatrix")
  
      with pytest.raises(ValueError):
          distance.squareform(np.random.rand(3), force="tovector")
  
      with pytest.raises(ValueError):
          distance.squareform(np.random.rand(3, 3, 3))
  
      with pytest.raises(ValueError):
          distance.squareform(np.random.rand(2, 4))
  
      with pytest.raises(ValueError):
          distance.squareform(np.random.rand(7))
  
file_path: mars/mars/tensor/spatial/distance/tests/test_distance.py
imports: import numpy
  import pytest
  import scipy.sparse
  from .....core import tile
  from ....datasource import tensor
  from ...None import distance
label_desc: Use image node_id 3 for calling a global function with example usage: test_squareform() without return types