code: function check() {
          if (done) {
            return;
          }
          checks--;
          if (checks <= 0) {
            return;
          }
          if (checks === 0) {
            done = true;
            finish(new Error('Machine unresponsive to STOP'));
            return;
          }
          var checkOptions = {
            method: 'GET',
            path: self.account + '/machines/' + serverId
          };
  
          self._request(checkOptions, function (err, body) {
            if (err) { return callback && callback(err) }
            if (body && body.state === 'stopped') {
              done = true;
              finish();
              return;
            }
          });
  
          setTimeout(check, 5000);
        }
docs: TODO refactor this setWait