def METHOD_NAME(grid_layer, mask, allow_oversized_mask):
    """
    Test connection of grid layers with correct grid mask.
    The first grid mask in the parametrization is correct and the second is too
    wide and tall but oversized mask is allowed.
    """
    nest.Connect(
        grid_layer,
        grid_layer,
        conn_spec={"rule": "pairwise_bernoulli", "mask": mask, "allow_oversized_mask": allow_oversized_mask},
    )