def apply_scripts(scripts, config, protocol_class, connection_class):
    """ Application of scripts modules

    It applies the script modules to the specified protocol and connection class instances, in order to build
    the resulting classes with all the additional features that the scripts implement (more information
    about how scripts are implemented and used can be found in the project documentation
    https://piqueserver.readthedocs.io/en/latest/architecture.html#extension-scripts).

    Args:
        scripts: List of scripts modules to apply
        config: It holds the dict of sections and options; this is required by the scripts
         logic
        protocol_class: The protocol class instance to update
        connection_class: The connection class instance to update

    Return:
        (FeatureProtocol, FeatureConnection): The updated protocol and connection class instances
    """
    for script in scripts:
        protocol_class, connection_class = script.apply_script(protocol_class,
            connection_class, config.get_dict())
    return protocol_class, connection_class
