def METHOD_NAME(self):
    dims = self.dataset.shape.nav.dims
    if dims not in (1, 2, 3):
        raise ValueError(
            "can only handle 1D/2D/3D nav currently, received %s dimensions" % dims
        )
    zyx = (
        self.parameters.get('z'),
        self.parameters.get('y'),
        self.parameters.get('x'),
    )
    messages = {
        1: "Need x, not y and not z to index 1D dataset, received z=%s, y=%s, x=%s",
        2: "Need x, y and not z to index 2D dataset, received z=%s, y=%s, x=%s",
        3: "Need x, y z to index 3D dataset, received z=%s, y=%s, x=%s",
    }
    keep = zyx[-dims:]
    drop = zyx[:-dims]
    if (None in keep) or not all(d is None for d in drop):
        raise ValueError(messages[dims] % zyx)
    return keep