def METHOD_NAME(
    self,
    run_id: str,
    cursor: Optional[int],
    length: int,
) -> CommandSlice:
    """Get a slice of maintenance run commands.
    Args:
        run_id: ID of the run.
        cursor: Requested index of first command in the returned slice.
        length: Length of slice to return.
    Raises:
        RunNotCurrentError: The given run identifier doesn't belong to a current run.
    """
    if run_id != self._engine_store.current_run_id:
        raise MaintenanceRunNotFoundError(run_id=run_id)
    the_slice = self._engine_store.engine.state_view.commands.get_slice(
        cursor=cursor, length=length
    )
    return the_slice