def METHOD_NAME():
    xx = mk_sample_xr_dataset(crs=None)
    # test duplicates behaviour in get_crs_from_{coord,attrs} are caught
    xx.band.attrs.update(grid_mapping="x")  # force exception in coord
    xx.x.attrs.update(crs="EPSG:4326")  # force exception in attr
    xx.y.attrs.update(crs="EPSG:3857")
    with pytest.warns(UserWarning):
        assert xx.band.geobox is not None
    # test crs not being a string
    xx = mk_sample_xr_dataset(crs=None)
    xx.attrs["crs"] = ["this will not parse"]
    with pytest.warns(UserWarning):
        assert xx.geobox is None
    xx.attrs["crs"] = "this will fail CRS() constructor"
    with pytest.warns(UserWarning):
        assert xx.geobox is None
    xx = mk_sample_xr_dataset(crs=epsg3857)
    xx.attrs.pop("crs", None)
    xx.band.attrs.pop("crs", None)
    xx.spatial_ref.attrs["spatial_ref"] = "this will fail CRS() constructor"
    with pytest.warns(UserWarning):
        assert xx.geobox is None