code: def _check_symmetric(
      x: np.ndarray, rtol: float = 1e-05, atol: float = 1e-08
  ) -> bool:
      """Validate a matrix is symmetric.
  
      Parameters
      ----------
      x: np.ndarray (2d array)
          Matrix to test if symmetric.
      rtol: float
          The relative tolerance.
      atol: float
          The absolute tolerance.
  
      Returns
      -------
      bool
          True is matrix is symmetric and false if matrix not symmetric
      """
      return np.allclose(x, x.T, rtol=rtol, atol=atol)
  
file_path: sktime/sktime/distances/tests/test_pairwise_distances.py
imports: from typing import Callable
  import numpy
  import pytest
  from sktime.distances._distance import _METRIC_INFOS, pairwise_distance
  from sktime.distances._numba_utils import _make_3d_series
  from sktime.distances.base import MetricInfo, NumbaDistance
  from sktime.distances.tests._shared_tests import _test_incorrect_parameters, _test_metric_parameters
  from sktime.distances.tests._utils import create_test_distance_numpy
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 1 for calling a global function with example usage: _check_symmetric(x, rtol, atol) and returns: np