def METHOD_NAME(dataframe, expected_grid):
    """
    Run triangulate.regular_grid with the -Goutputfile.nc parameter.
    """
    data = dataframe.to_numpy()
    with GMTTempFile(suffix=".nc") as tmpfile:
        output = triangulate.regular_grid(
            data=data, spacing=1, region=[2, 4, 5, 6], outgrid=tmpfile.name
        )
        assert output is None  # check that output is None since outgrid is set
        assert Path(tmpfile.name).stat().st_size > 0  # check that outgrid exists
        with xr.open_dataarray(tmpfile.name) as grid:
            assert isinstance(grid, xr.DataArray)
            assert grid.gmt.registration == 0  # Gridline registration
            assert grid.gmt.gtype == 0  # Cartesian type
            xr.testing.assert_allclose(a=grid, b=expected_grid)