def METHOD_NAME():
    """
    Test to ensure the named grafana dashboard is deleted.
    """
    name = "myservice"
    ret = {"name": name, "result": None, "changes": {}, "comment": ""}
    mock = MagicMock(
        side_effect=[
            {"hosts": True, "index": False},
            {"hosts": True, "index": True},
            {"hosts": True, "index": True},
        ]
    )
    mock_f = MagicMock(side_effect=[True, False])
    with patch.dict(
        grafana.__salt__, {"config.option": mock, "elasticsearch.exists": mock_f}
    ):
        pytest.raises(SaltInvocationError, grafana.dashboard_absent, name)
        with patch.dict(grafana.__opts__, {"test": True}):
            comt = "Dashboard myservice is set to be removed."
            ret.update({"comment": comt, "result": None})
            assert grafana.dashboard_absent(name) == ret
        comt = "Dashboard myservice does not exist."
        ret.update({"comment": comt, "result": True})
        assert grafana.dashboard_absent(name) == ret