def METHOD_NAME(params):
    """Generator function for Mask R-CNN head architecture."""
    head_params = params.mrcnn_head
    return heads.MaskrcnnHead(
        params.model_params.architecture.num_classes,
        params.architecture.mask_target_size,
        head_params.num_convs,
        head_params.num_filters,
        head_params.use_separable_conv,
        params.model_params.norm_activation.activation,
        head_params.use_batch_norm,
        norm_activation=norm_activation_generator(params.model_params.norm_activation),
    )