code: public function checkCurrentVersionActive($versions, $activeVersion)
      {
          $current = $this->getCurrentVersion($versions);
  
          if ($current != $activeVersion) {
              throw new LocalizedException(__('Active versions mismatch.'));
          }
  
          return true;
      }
docs: Check if active versions (local and remote) are in sync
  
  @param $versions
  @param $activeVersion
  @return bool
  @throws LocalizedException