code: def parse_angle(input_dir):
      
      if isinstance(input_dir, str):
          # abb_dirs = abbrieviated directions
          abb_dirs = [_abbrieviate_direction(input_dir)]
      elif isinstance(input_dir, list):
          input_dir_str = ','.join(input_dir)
          abb_dir_str = _abbrieviate_direction(input_dir_str)
          abb_dirs = abb_dir_str.split(',')
      return itemgetter(*abb_dirs)(DIR_DICT)
docs: Calculate the meteorological angle from directional text.
  
      Works for abbrieviations or whole words (E -> 90 | South -> 180)
      and also is able to parse 22.5 degreee angles such as ESE/East South East
  
      Parameters
      ----------
      input_dir : string or array-like strings
          Directional text such as west, [south-west, ne], etc
  
      Returns
      -------
      angle
          The angle in degrees