docs: def wait_for_redfish_firmware_update_to_complete(self, redfish_object):
          """Continuously polls for iLO firmware update to complete.
  
          :param redfish_object: redfish instance
          """
          p_state = ['Idle']
          c_state = ['Idle']
  
          def has_firmware_flash_completed():
              """Checks for completion status of firmware update operation
  
              The below table shows the conditions for which the firmware update
              will be considered as DONE (be it success or error)::
  
              +-----------------------------------+-----------------------------+
              |    Previous state                 |   Current state             |
              +===================================+=============================+
              |    Idle                           |   Error, Complete           |
              +-----------------------------------+-----------------------------+
              |    Updating, Verifying,           |   Complete, Error,          |
              |    Uploading, Writing             |   Unknown, Idle             |
              +-----------------------------------+-----------------------------+
  
              :returns: True upon firmware update completion otherwise False
              """
              curr_state, curr_percent = self.get_firmware_update_progress()
              p_state[0] = c_state[0]
              c_state[0] = curr_state
              if (((p_state[0] in ['Updating', 'Verifying',
                                   'Uploading', 'Writing'])
                      and (c_state[0] in ['Complete', 'Error',
                                          'Unknown', 'Idle']))
                      or (p_state[0] == 'Idle' and (c_state[0] in
                                                    ['Complete', 'Error']))):
                  return True
              return False
  
          common.wait_for_operation_to_complete(
              has_firmware_flash_completed,
              delay_bw_retries=30,
              failover_msg='iLO firmware update has failed.'
          )
          common.wait_for_ilo_after_reset(redfish_object)