static fromConfig(config) {
        if (config === null) return null;
        switch (config.type) {
            case 'TemplateProcessing':
                return new TemplateProcessing(config);

            case 'ByteLevel':
                return new ByteLevelPostProcessor(config);

            case 'RobertaProcessing':
                return new RobertaProcessing(config);
            case 'BertProcessing':
                return new BertProcessing(config);

            case 'Sequence':
                return new PostProcessorSequence(config);
            default:
                throw new Error(`Unknown PostProcessor type: ${config.type}`);
        }
    }
Factory method to create a PostProcessor object from a configuration object.

@param {Object} config Configuration object representing a PostProcessor.
@returns {PostProcessor} A PostProcessor object created from the given configuration.
@throws {Error} If an unknown PostProcessor type is encountered.