def METHOD_NAME(s: str):
    """Given a sequence of directions, eg. 'left left up', moves the cursor accordingly using edit.{left,right,up,down}."""
    for d in s.split():
        if d in ("left", "right", "up", "down"):
            getattr(actions.edit, d)()
        else:
            raise RuntimeError(f"invalid arrow key: {d}")