docs: def set_pending_boot_mode(self, boot_mode):
          """Sets the boot mode of the system for next boot.
  
          :param boot_mode: either 'uefi' or 'legacy'.
          :raises: IloInvalidInputError, on an invalid input.
          :raises: IloError, on an error from iLO.
          """
          sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID)
  
          if boot_mode.upper() not in BOOT_MODE_MAP_REV.keys():
              msg = (('Invalid Boot mode: "%(boot_mode)s" specified, valid boot '
                      'modes are either "uefi" or "legacy"')
                     % {'boot_mode': boot_mode})
              raise exception.IloInvalidInputError(msg)
  
          try:
              sushy_system.bios_settings.pending_settings.set_pending_boot_mode(
                  BOOT_MODE_MAP_REV.get(boot_mode.upper()))
          except sushy.exceptions.SushyError as e:
              msg = (self._('The Redfish controller failed to set '
                            'pending boot mode to %(boot_mode)s. '
                            'Error: %(error)s') %
                     {'boot_mode': boot_mode, 'error': str(e)})
              LOG.debug(msg)
              raise exception.IloError(msg)