code: def wavelength_to_rgb(wavelength: Union[float, int]) -> List[float]:
      """
      Converts wavelength in nanometers to the RGB color.
  
      :param wavelength: wavelength in the nanometers
      :returns: Array of normalized RGB values.
      """
      wavelength = float(wavelength)
      range1 = Range(380, 440)
      range2 = Range(440, 490)
      range3 = Range(490, 510)
      range4 = Range(510, 580)
      range5 = Range(580, 645)
      range6 = Range(645, 780)
  
      _r, _g, _b = 0.0, 0.0, 0.0
      if wavelength in range1:
          _r = (range1.right - wavelength) / range1.length
          _g = 0.0
          _b = 1.0
      elif wavelength in range2:
          _r = 0.0
          _g = (wavelength - range2.left) / range2.length
          _b = 1.0
      elif wavelength in range3:
          _r = 0.0
          _g = 1.0
          _b = (range3.right - wavelength) / range3.length
      elif wavelength in range4:
          _r = (wavelength - range4.left) / range4.length
          _g = 1.0
          _b = 0.0
      elif wavelength in range5:
          _r = 1.0
          _g = (range5.right - wavelength) / range5.length
          _b = 0.0
      elif wavelength in range6:
          _r = 1.0
          _g = 0.0
          _b = 0.0
  
      return [_r, _g, _b]
  
imports: from abc import ABC, abstractmethod
  from logging import Logger
  from pathlib import Path
  import string
  from typing import Any, Callable, List, Tuple, Union
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: wavelength_to_rgb(wavelength) and returns: list