Please note this function is used in [L513](https://github.com/mozilla-b2g/gaia/pull/11968/files#L0R513) and [L431](https://github.com/mozilla-b2g/gaia/pull/11968/files#L0R431).