def METHOD_NAME():
    """Test :func:`esmvalcore.iris_helpers.add_leading_dim_to_cube`."""
    lat_coord = DimCoord(
        [0.0, 1.0, 2.0],
        var_name='lat',
        standard_name='latitude',
        long_name='latitude',
        units='degrees_north',
    )
    lon_coord = DimCoord(
        [0.0, 1.0],
        var_name='lon',
        standard_name='longitude',
        long_name='longitude',
        units='degrees_east',
    )
    height_coord = AuxCoord(
        [2.0, 1.0],
        var_name='height',
        standard_name='height',
        long_name='height',
        units='m',
        attributes={'positive': 'up'},
    )
    land_mask = AncillaryVariable(
        [0.5, 0.2],
        var_name='sftlf',
        standard_name=None,
        long_name='Land fraction',
        units='1',
    )
    cell_area = CellMeasure(
        [1.0, 2.0],
        var_name='areacella',
        standard_name='cell_area',
        long_name='Cell Area',
        units='m2',
        measure='area',
    )
    cube = Cube(
        [1, 42],
        var_name='ta',
        standard_name='air_temperature',
        long_name='Air Temperature',
        units='K',
        attributes={'model_name': 'ESM'},
        cell_methods=[CellMethod('mean', coords='time')],
        aux_coords_and_dims=[(height_coord, 0)],
        dim_coords_and_dims=[(lon_coord, 0)],
        ancillary_variables_and_dims=[(land_mask, 0)],
        cell_measures_and_dims=[(cell_area, 0)],
    )
    new_cube = add_leading_dim_to_cube(cube, lat_coord)
    np.testing.assert_equal(new_cube.data, [[1, 42], [1, 42], [1, 42]])
    assert new_cube.var_name == 'ta'
    assert new_cube.standard_name == 'air_temperature'
    assert new_cube.long_name == 'Air Temperature'
    assert new_cube.units == 'K'
    assert new_cube.cell_methods == (CellMethod('mean', coords='time'),)
    assert new_cube.attributes == {'model_name': 'ESM'}
    assert new_cube.coords(lat_coord, dim_coords=True)
    assert new_cube.coords(lon_coord, dim_coords=True)
    assert new_cube.coords(height_coord, dim_coords=False)
    assert new_cube.coord_dims(lat_coord) == (0,)
    assert new_cube.coord_dims(lon_coord) == (1,)
    assert new_cube.coord_dims(height_coord) == (1,)
    assert new_cube.ancillary_variables(land_mask)
    assert new_cube.cell_measures(cell_area)
    assert new_cube.ancillary_variable_dims(land_mask) == (1,)
    assert new_cube.cell_measure_dims(cell_area) == (1,)