def METHOD_NAME(self, masked, inverted=False):
    tif_header_keys = [
        256,
        257,
        258,
        259,
        262,
        273,
        277,
        278,
        279,
        284,
        339,
        33550,
        33922,
        42113,
        # Don't add a check entry for this, as coding changed between gdal
        # version 1 and 2.
        # tif_header_entries[42113] = (u'1e+20',)
    ]
    tif_header_entries = {
        256: (160,),
        257: (159,),
        258: (32,),
        259: (1,),
        262: (1,),
        # Skip this one: behaviour is not consistent across gdal versions.
        # 273: (354, 8034, 15714, 23394, 31074, 38754, 46434,
        #       54114, 61794, 69474, 77154, 84834, 92514, 100194),
        277: (1,),
        278: (12,),
        279: (
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            7680,
            1920,
        ),
        284: (1,),
        339: (3,),
        33550: (1.125, 1.125, 0.0),
        33922: (0.0, 0.0, 0.0, -0.5625, 89.4375, 0.0),
    }
    fin = tests.get_data_path(
        ("NetCDF", "global", "xyt", "SMALL_total_column_co2.nc")
    )
    cube = iris.load_cube(fin)[0]
    # PIL doesn't support float64
    cube.data = cube.data.astype("f4")
    # Ensure longitude values are continuous and monotonically increasing,
    # and discard the 'half cells' at the top and bottom of the UM output
    # by extracting a subset.
    east = iris.Constraint(longitude=lambda cell: cell < 180)
    non_edge = iris.Constraint(latitude=lambda cell: -90 < cell < 90)
    cube = cube.extract(east & non_edge)
    cube.coord("longitude").guess_bounds()
    cube.coord("latitude").guess_bounds()
    if masked:
        # Mask some of the data + expect a slightly different header...
        cube.data = np.ma.masked_where(cube.data <= 380, cube.data)
    if inverted:
        # Check with the latitude coordinate (and the corresponding
        # cube.data) inverted.
        # The output should be exactly the same.
        coord = cube.coord("latitude")
        coord.points = coord.points[::-1]
        coord.bounds = None
        coord.guess_bounds()
        cube.data = cube.data[::-1, :]
    self.check_tiff(cube, tif_header_keys, tif_header_entries)