def METHOD_NAME(self, df, orient):
    # TODO should stack do something with ymin/ymax style marks?
    # Should there be an upstream conversion to baseline/height parameterization?
    if df["baseline"].nunique() > 1:
        err = "Stack move cannot be used when baselines are already heterogeneous"
        raise RuntimeError(err)
    other = {"x": "y", "y": "x"}[orient]
    stacked_lengths = (df[other] - df["baseline"]).dropna().cumsum()
    offsets = stacked_lengths.shift(1).fillna(0)
    df[other] = stacked_lengths
    df["baseline"] = df["baseline"] + offsets
    return df