static parseAttr(elem, name, parseFunction, defaultValue = null) {
    let parsedValue = null;

    const value = elem.attributes[name];
    if (value != null) {
      parsedValue = parseFunction(value);
    }
    return parsedValue == null ? defaultValue : parsedValue;
  }
Parses an attribute by its name.
@param {!shaka.extern.xml.Node} elem The XML element.
@param {string} name The attribute name.
@param {function(string): (T|null)} parseFunction A function that parses
  the attribute.
@param {(T|null)=} defaultValue The attribute's default value, if not
  specified, the attribute's default value is null.
@return {(T|null)} The parsed attribute on success, or the attribute's
  default value if the attribute does not exist or could not be parsed.
@template T