def NetworkSetSFANodeClass(sfa_node_class, network):
    """Replaces the field sfa_node_class of all layers with a specific node class.

    This function is useful, for example, to transform an SFA network into a PCA network. """
    for i, layer in enumerate(network.layers):
        layer.sfa_node_class = sfa_node_class
    return network