markAsBusy(instanceId) {
    if (this._busyInstances.has(instanceId)) {
      return this._busyInstances.get(instanceId);
    }

    const instance = this._freeInstances.get(instanceId);
    if (!instance) {
      throw new DetoxInternalError(`Cannot mark an unknown instance ${instanceId} as busy`);
    }

    this._busyInstances.set(instanceId, instance);
    this._freeInstances.delete(instanceId);
    return instance;
  }
@param {string} instanceId
@returns {import('./services/dto/GenyInstance')}