public static function getVersions($module = null) {
    $req = new GetVersionsRequest();
    $resp = new GetVersionsResponse();

    if ($module !== null) {
      if (!is_string($module)) {
        throw new \InvalidArgumentException(
            '$module must be a string. Actual type: ' . gettype($module));
      }
      $req->setModule($module);
    }

    try {
      ApiProxy::makeSyncCall('modules', 'GetVersions', $req, $resp);
    } catch (ApplicationError $e) {
      throw errorCodeToException($e->getApplicationError());
    }
    return $resp->getVersionList();
  }