This is the same as [1], so it make sense to create a function to wrap it and call if where needed! :)

[1] https://github.com/mozilla-b2g/gaia/pull/18088/files#diff-af7a3fb259f614cb38f498ee6deedb0dR279