def METHOD_NAME(params):
    """Generator function for various FPN models."""
    assert params.model_params.architecture.multilevel_features == "fpn"
    fpn_params = params.model_params.architecture.fpn_params
    fpn_fn = fpn.Fpn(
        min_level=params.model_params.architecture.min_level,
        max_level=params.model_params.architecture.max_level,
        fpn_feat_dims=fpn_params.fpn_feat_dims,
        use_separable_conv=fpn_params.use_separable_conv,
        activation=params.model_params.norm_activation.activation,
        use_batch_norm=fpn_params.use_batch_norm,
        norm_activation=norm_activation_generator(params.model_params.norm_activation),
    )
    return fpn_fn