code: def _get_distance_to_intersection(view_vector, sat_pos, ellipsoid):
      """Get distance to intersection with the earth.
  
      If the instrument is pointing towards the earth, there will be two
      intersections with the surface. Choose the one on the instrument-facing
      side of the earth.
      """
      d1, d2 = _get_distances_to_intersections(
          view_vector, sat_pos, ellipsoid
      )
      return min(d1, d2)
  
imports: from collections import namedtuple
  import dask.array
  import numba
  import numpy
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 24 for calling a global function with example usage: _get_distance_to_intersection(view_vector, sat_pos, ellipsoid) and returns: min