function createInvalidPluginImplementationError(
    msg,
    {pluginDef, pluginImpl} = {}
  ) {
    const err = new Error(msg);
    err.code = constants$4.INVALID_PLUGIN_IMPLEMENTATION;
    err.pluginDef = pluginDef;
    err.pluginImpl = pluginImpl;
    return err;
  }
Creates an error object to be thrown when a plugin implementation (user code) is invalid
@static
@param {string} msg - Error message
@param {Object} [opts] - Plugin definition and user-supplied implementation
@param {PluginDefinition} [opts.pluginDef] - Plugin Definition
@param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied)
@public
@returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}