DEV: Remove code that is not being used. (PR #14006)

Code was added in e15c86e8c5ff9fcb8aec32d3bab641c2ab4193a9 but it isn’t necessary anymore.

Follow-up to e15c86e8c5ff9fcb8aec32d3bab641c2ab4193a9

GitHub

This was never properly exposed as a plugin API so plugins are not meant to use this function directly so we’re removing this without depreciation.