code: def add_shading(elevation, azimuth, altitude):
      """Add shading to SRTM elevation data, using azimuth and altitude
      of the sun.
  
      Parameters
      ----------
      elevation
          SRTM elevation data (in meters)
      azimuth
          Azimuth of the Sun (in degrees)
      altitude
          Altitude of the Sun (in degrees)
  
      Return shaded SRTM relief map.
      """
      azimuth = np.deg2rad(azimuth)
      altitude = np.deg2rad(altitude)
      x, y = np.gradient(elevation)
      slope = np.pi / 2 - np.arctan(np.sqrt(x * x + y * y))
      # -x here because of pixel orders in the SRTM tile
      aspect = np.arctan2(-x, y)
      shaded = np.sin(altitude) * np.sin(slope) + np.cos(
          altitude
      ) * np.cos(slope) * np.cos((azimuth - np.pi / 2) - aspect)
      return shaded
  
imports: import io
  from pathlib import Path
  import warnings
  import numpy
  from cartopy import config
  import cartopy.crs
  from cartopy.io import Downloader, LocatedImage, RasterSource, fh_getter
label_desc: Use image node_id 1 for calling a global function with example usage: add_shading(elevation, azimuth, altitude) and returns: shaded