code: def _calculate_distances_to_sample(
      categorical_sample: np.ndarray,
      numeric_sample: np.ndarray,
      cat_data: np.ndarray,
      numeric_data: np.ndarray,
      numeric_feature_ranges: np.ndarray,
      num_features: int,
  ):
      """
      Calculate Gower's distance between a single sample to the rest of the samples in the dataset.
  
      Parameters
      ----------
      categorical_sample
          The categorical features part of the sample to compare to the rest of the samples.
      numeric_sample
          The numeric features part of the sample to compare to the rest of the samples.
      cat_data
          The categorical features part of the dataset(after preprocessing).
      numeric_data
          The numeric features part of the dataset(after preprocessing).
      numeric_feature_ranges
          The range sizes of each numerical feature.
      num_features
          The total number of features in the dataset.
      Returns
      -------
      numpy.ndarray
          The distances to the rest of the samples.
      """
      numeric_feat_dist_to_sample = numeric_data - numeric_sample
      np.abs(
          numeric_feat_dist_to_sample, out=numeric_feat_dist_to_sample
      )
      # if a numeric feature value is null for one of the two samples, the distance over it is ignored
      null_dist_locations = np.logical_or(
          numeric_feat_dist_to_sample == np.inf,
          numeric_feat_dist_to_sample == np.nan,
      )
      null_numeric_features_per_sample = fast_sum_by_row(
          null_dist_locations
      )
      numeric_feat_dist_to_sample[null_dist_locations] = 0
      numeric_feat_dist_to_sample = numeric_feat_dist_to_sample.astype(
          "float64"
      )
      np.divide(
          numeric_feat_dist_to_sample,
          numeric_feature_ranges,
          out=numeric_feat_dist_to_sample,
      )
  
      cat_feature_dist_to_sample = (cat_data - categorical_sample) != 0
  
      dist_to_sample = fast_sum_by_row(
          cat_feature_dist_to_sample
      ) + fast_sum_by_row(numeric_feat_dist_to_sample)
      return dist_to_sample / (
          -null_numeric_features_per_sample + num_features
      )
  
file_path: deepchecks/deepchecks/utils/gower_distance.py
imports: from typing import Hashable, List
  import numpy
  import pandas
  from deepchecks.utils.array_math import fast_sum_by_row
label_desc: Use image node_id 3 for calling a global function with example usage: _calculate_distances_to_sample(categorical_sample, numeric_sample, cat_data, numeric_data, numeric_feature_ranges, num_features) and returns: unknown