modifySegmentTemplate_(patchNode) {
    const TXml = shaka.util.TXml;
    const paths = TXml.parseXpath(patchNode.attributes['sel'] || '');
    const lastPath = paths[paths.length - 1];
    if (!lastPath.attribute) {
      return [];
    }
    const contextIds = this.getContextIdsFromPath_(paths);
    const content = TXml.getContents(patchNode) || '';

    for (const contextId of contextIds) {
      /** @type {shaka.dash.DashParser.Context} */
      const context = this.contextCache_.get(contextId);
      goog.asserts.assert(context && context.representation.segmentTemplate,
          'cannot modify segment template');
      TXml.modifyNodeAttribute(context.representation.segmentTemplate,
          patchNode.tagName, lastPath.attribute, content);
    }
    return contextIds;
  }
Modifies SegmentTemplate based on MPD patch.

@param {!shaka.extern.xml.Node} patchNode
@return {!Array<string>} context ids with updated timeline
@private