code: def test_euclidean_distances_op():
      x = mt.random.rand(10, 3)
      xx = mt.random.rand(1, 10)
      y = mt.random.rand(11, 3)
  
      d = euclidean_distances(x, X_norm_squared=xx)
      assert d.op.x_norm_squared.key == check_array(xx).T.key
  
      d = euclidean_distances(
          x,
          y,
          X_norm_squared=mt.random.rand(10, 1, dtype=mt.float32),
          Y_norm_squared=mt.random.rand(1, 11, dtype=mt.float32),
      )
      assert d.op.x_norm_squared is None
      assert d.op.y_norm_squared is None
  
      # XX shape incompatible
      with pytest.raises(ValueError):
          euclidean_distances(x, X_norm_squared=mt.random.rand(10))
  
      # XX shape incompatible
      with pytest.raises(ValueError):
          euclidean_distances(x, X_norm_squared=mt.random.rand(11, 1))
  
      # YY shape incompatible
      with pytest.raises(ValueError):
          euclidean_distances(x, y, Y_norm_squared=mt.random.rand(10))
  
file_path: mars/mars/learn/metrics/pairwise/tests/test_euclidean_distances.py
imports: import numpy
  import scipy.sparse
  import pytest
  from sklearn.metrics import euclidean_distances
  from .....None import tensor
  from .....config import option_context
  from .....lib.sparse import SparseNDArray
  from ....utils import check_array
  from ...None import euclidean_distances
label_desc: Use image node_id 1 for calling a global function with example usage: test_euclidean_distances_op() without return types