getURLParametersFunction_(elem) {
    const TXml = shaka.util.TXml;
    const urlQueryInfo = TXml.findChildNS(
        elem, shaka.dash.DashParser.UP_NAMESPACE_, 'UrlQueryInfo');
    if (urlQueryInfo && TXml.parseAttr(urlQueryInfo, 'useMPDUrlQuery',
        TXml.parseBoolean, /* defaultValue= */ false)) {
      const queryTemplate = urlQueryInfo.attributes['queryTemplate'];
      if (queryTemplate) {
        return () => {
          if (queryTemplate == '$querypart$') {
            return this.lastManifestQueryParams_;
          }
          const parameters = queryTemplate.split('&').map((param) => {
            if (param == '$querypart$') {
              return this.lastManifestQueryParams_;
            } else {
              const regex = /\$query:(.*?)\$/g;
              const parts = regex.exec(param);
              if (parts && parts.length == 2) {
                const paramName = parts[1];
                const queryData =
                    new goog.Uri.QueryData(this.lastManifestQueryParams_);
                const value = queryData.get(paramName);
                if (value.length) {
                  return paramName + '=' + value[0];
                }
              }
              return param;
            }
          });
          return parameters.join('&');
        };
      }
    }
    return null;
  }
@param {!shaka.extern.xml.Node} elem
@return {?function():string}
@private