static getStyleAttribute_(cueElement, region, styles, attribute,
      shouldInheritRegionStyles=true) {
    // An attribute can be specified on region level or in a styling block
    // associated with the region or original element.
    const TtmlTextParser = shaka.text.TtmlTextParser;
    const attr = TtmlTextParser.getStyleAttributeFromElement_(
        cueElement, styles, attribute);
    if (attr) {
      return attr;
    }

    if (shouldInheritRegionStyles) {
      return TtmlTextParser.getStyleAttributeFromRegion_(
          region, styles, attribute);
    }
    return null;
  }
Finds a specified attribute on either the original cue element or its
associated region and returns the value if the attribute was found.

@param {!shaka.extern.xml.Node} cueElement
@param {shaka.extern.xml.Node} region
@param {!Array<!shaka.extern.xml.Node>} styles
@param {string} attribute
@param {boolean=} shouldInheritRegionStyles
@return {?string}
@private