code: def initiate_upgrade_action_and_wait(self, components_mask, action,
                                           timeout=2, interval=0.1):
          
          try:
              self.initiate_upgrade_action(components_mask, action)
          except CompletionCodeError as e:
              if e.cc == CC_LONG_DURATION_CMD_IN_PROGRESS:
                  self.wait_for_long_duration_command(
                          constants.CMDID_HPM_INITIATE_UPGRADE_ACTION,
                          timeout, interval)
              else:
                  raise HpmError('initiate_upgrade_action CC=0x%02x' % e.cc)
docs: Initiate Upgrade Action and wait for
              long running command.