code: def check_pairwise_arrays(X, Y, precomputed=False, dtype=None):
      X, Y, dtype_float = PairwiseDistances._return_float_dtype(X, Y)
  
      estimator = "check_pairwise_arrays"
      if dtype is None:
          dtype = dtype_float
  
      if Y is X or Y is None:
          X = Y = check_array(
              X, accept_sparse=True, dtype=dtype, estimator=estimator
          )
      else:
          X = check_array(
              X, accept_sparse=True, dtype=dtype, estimator=estimator
          )
          Y = check_array(
              Y, accept_sparse=True, dtype=dtype, estimator=estimator
          )
  
      if precomputed:
          if X.shape[1] != Y.shape[0]:
              raise ValueError(
                  "Precomputed metric requires shape "
                  f"(n_queries, n_indexed). Got ({X.shape[0]}, {X.shape[1]}) "
                  f"for {Y.shape[0]} indexed."
              )
      elif X.shape[1] != Y.shape[1]:
          raise ValueError(
              "Incompatible dimension for X and Y matrices: "
              f"X.shape[1] == {X.shape[1]} while Y.shape[1] == {Y.shape[1]}"
          )
  
      return X, Y
  
file_path: mars/mars/learn/metrics/pairwise/core.py
imports: import itertools
  import numpy
  from ....core import recursive_tile
  from ....serialization.serializables import Int64Field
  from ....tensor.operands import TensorOperand, TensorOperandMixin
  from ....tensor import tensor
  from ....utils import has_unknown_shape
  from ...utils import check_array
label_desc: Use image node_id 2 for calling the PairwiseDistances obj's underlying member method code with example usage: obj.check_pairwise_arrays(X, Y, precomputed, dtype) and returns: X,  Y