code: def _check_distance(distance):
      """Check if the distance if a non-negative real number."""
      if gs.any(distance < 0):
          raise ValueError(
              "The distance should be a non-negative real number."
          )
      distance = gs.array(distance, dtype=float)
      return distance
  
file_path: geomstats/geomstats/learning/radial_kernel_functions.py
imports: import geomstats.backend
label_desc: Use image node_id 1 for calling a global function with example usage: _check_distance(distance) and returns: distance