code: def _solar_position(date):
      """
      Calculate the latitude and longitude point where the sun is
      directly overhead for the given date.
  
      Parameters
      ----------
      date
          A UTC datetime object.
  
      Returns
      -------
      (latitude, longitude) in degrees
  
      Note
      ----
      Algorithm implemented following equations from Chapter 5 (Algorithm 29):
      Vallado, David 'Fundamentals of Astrodynamics and Applications', (2007)
  
      """
      # NOTE: Constants are in degrees in the textbook,
      #       so we need to convert the values from deg2rad when taking sin/cos
  
      # Centuries from J2000
      T_UT1 = (_julian_day(date) - 2451545.0) / 36525
  
      # solar longitude (deg)
      lambda_M_sun = (280.460 + 36000.771 * T_UT1) % 360
  
      # solar anomaly (deg)
      M_sun = (357.5277233 + 35999.05034 * T_UT1) % 360
  
      # ecliptic longitude
      lambda_ecliptic = (
          lambda_M_sun
          + 1.914666471 * np.sin(np.deg2rad(M_sun))
          + 0.019994643 * np.sin(np.deg2rad(2 * M_sun))
      )
  
      # obliquity of the ecliptic (epsilon in Vallado's notation)
      epsilon = 23.439291 - 0.0130042 * T_UT1
  
      # declination of the sun
      delta_sun = np.rad2deg(
          np.arcsin(
              np.sin(np.deg2rad(epsilon))
              * np.sin(np.deg2rad(lambda_ecliptic))
          )
      )
  
      # Greenwich mean sidereal time (seconds)
      theta_GMST = (
          67310.54841
          + (876600 * 3600 + 8640184.812866) * T_UT1
          + 0.093104 * T_UT1**2
          - 6.2e-6 * T_UT1**3
      )
      # Convert to degrees
      theta_GMST = (theta_GMST % 86400) / 240
  
      # Right ascension calculations
      numerator = (
          np.cos(np.deg2rad(epsilon))
          * np.sin(np.deg2rad(lambda_ecliptic))
          / np.cos(np.deg2rad(delta_sun))
      )
      denominator = np.cos(np.deg2rad(lambda_ecliptic)) / np.cos(
          np.deg2rad(delta_sun)
      )
  
      alpha_sun = np.rad2deg(np.arctan2(numerator, denominator))
  
      # longitude is opposite of Greenwich Hour Angle (GHA)
      # GHA == theta_GMST - alpha_sun
      lon = -(theta_GMST - alpha_sun)
      if lon < -180:
          lon += 360
  
      return (delta_sun, lon)
  
file_path: cartopy/lib/cartopy/feature/nightshade.py
imports: import datetime
  import numpy
  import shapely.geometry
  from ..None import crs
  from .None import ShapelyFeature
label_desc: Use image node_id 2 for calling a global function with example usage: _solar_position(date) and returns: delta_sun,  lon