code: def calibrate_bt(array, attributes, index, band_name):
      """Calibration for the emissive channels."""
      offset = np.float32(attributes["radiance_offsets"][index])
      scale = np.float32(attributes["radiance_scales"][index])
  
      array = (array - offset) * scale
  
      # Planck constant (Joule second)
      h__ = np.float32(6.6260755e-34)
  
      # Speed of light in vacuum (meters per second)
      c__ = np.float32(2.9979246e8)
  
      # Boltzmann constant (Joules per Kelvin)
      k__ = np.float32(1.380658e-23)
  
      # Derived constants
      c_1 = 2 * h__ * c__ * c__
      c_2 = (h__ * c__) / k__
  
      # Effective central wavenumber (inverse centimeters)
      cwn = np.array(
          [
              2.641775e3,
              2.505277e3,
              2.518028e3,
              2.465428e3,
              2.235815e3,
              2.200346e3,
              1.477967e3,
              1.362737e3,
              1.173190e3,
              1.027715e3,
              9.080884e2,
              8.315399e2,
              7.483394e2,
              7.308963e2,
              7.188681e2,
              7.045367e2,
          ],
          dtype=np.float32,
      )
  
      # Temperature correction slope (no units)
      tcs = np.array(
          [
              9.993411e-1,
              9.998646e-1,
              9.998584e-1,
              9.998682e-1,
              9.998819e-1,
              9.998845e-1,
              9.994877e-1,
              9.994918e-1,
              9.995495e-1,
              9.997398e-1,
              9.995608e-1,
              9.997256e-1,
              9.999160e-1,
              9.999167e-1,
              9.999191e-1,
              9.999281e-1,
          ],
          dtype=np.float32,
      )
  
      # Temperature correction intercept (Kelvin)
      tci = np.array(
          [
              4.770532e-1,
              9.262664e-2,
              9.757996e-2,
              8.929242e-2,
              7.310901e-2,
              7.060415e-2,
              2.204921e-1,
              2.046087e-1,
              1.599191e-1,
              8.253401e-2,
              1.302699e-1,
              7.181833e-2,
              1.972608e-2,
              1.913568e-2,
              1.817817e-2,
              1.583042e-2,
          ],
          dtype=np.float32,
      )
  
      # Transfer wavenumber [cm^(-1)] to wavelength [m]
      cwn = 1.0 / (cwn * 100)
  
      # Some versions of the modis files do not contain all the bands.
      emmissive_channels = [
          "20",
          "21",
          "22",
          "23",
          "24",
          "25",
          "27",
          "28",
          "29",
          "30",
          "31",
          "32",
          "33",
          "34",
          "35",
          "36",
      ]
      global_index = emmissive_channels.index(band_name)
  
      cwn = cwn[global_index]
      tcs = tcs[global_index]
      tci = tci[global_index]
      array = c_2 / (
          cwn * np.log(c_1 / (1000000 * array * cwn**5) + 1)
      )
      array = (array - tci) / tcs
      return array
  
imports: import logging
  import numpy
  import xarray
  from satpy.readers.hdf4_utils import from_sds
  from satpy.readers.hdfeos_base import HDFEOSBaseFileReader, HDFEOSGeoReader
label_desc: Use image node_id 4 for calling a global function with example usage: calibrate_bt(array, attributes, index, band_name) and returns: array