def execute_pipeline_operation(pipeline, operation_list):
    """
    .. py:method:: execute_pipeline_operation
    Execute the operations defined in operation_list in sequence on the
    pipeline.

    :param pipeline:
        The pipeline to execute the operations on.
    :type pipeline: AzureMLForecastPipeline

    :param operation_list:
        Each tuple in the list represents a single operation to be executed
        on the pipeline. The first element of the tuple is the operation type,
        e.g ```AzureMLForecastPipelineExecutionType.fit```, and the second element
        of the tuple is the dictionary of the keyword arguments and values to
        be passed into the operation, e.g. ```{'X': sample_tsdf}```, where the
        sample_tsdf is a TimeSeriesDataFrame input for the operation.
    :type operation_list: list of tuples

    :returns:
        (pipeline, last_step_output)
        pipeline: AzureMLForecastPipeline
            The pipeline object after the execution of the operations.
        last_step_output:
            The output of the last step operation.
    :rtype: tuple

    """
    if len(operation_list) > 0:
        for i, operation_item in enumerate(operation_list):
            operation_type = operation_item[0]
            operation_args = operation_item[1]
            step_output = pipeline.execute_pipeline_op(operation_type, **
                operation_args)
    return pipeline, step_output
