class_docstr: Base Pipeline class to be used to create custom pipelines
class_docstr_tok: ["Base","Pipeline","class","to","be","used","to","create","custom","pipelines"]
docstr: This functions is responsible to loop through logics
  Args:
      data (Any, optional): Input Data to run the pipeline. Defaults to None.
  
  Returns:
      Any: Depends on the type can return anything
docstr_tok: ["This","functions","is","responsible","to","loop","through","logics","Args",":","data","(","Any",",","optional",")",":","Input","Data","to","run","the","pipeline",".","Defaults","to","None",".","Returns",":","Any",":","Depends","on","the","type","can","return","anything"]
code: def run(self, data: Any = None) -> Any:
      """
      This functions is responsible to loop through logics
      Args:
          data (Any, optional): Input Data to run the pipeline. Defaults to None.
  
      Returns:
          Any: Depends on the type can return anything
      """
      try:
          for index, logic in enumerate(self._steps):
              self._logger.log(
                  f"Executing Step {index}: {logic.__class__.__name__}"
              )
  
              if logic.skip_if is not None and logic.skip_if(
                  self._context
              ):
                  continue
  
              data = logic.execute(
                  data,
                  logger=self._logger,
                  config=self._context.config,
                  context=self._context,
              )
  
      except Exception as e:
          self._logger.log(
              f"Pipeline failed on step {index}: {e}", logging.ERROR
          )
          raise e
  
      return data
  
file_path: pandas-ai/pandasai/pipelines/pipeline.py
imports: import logging
  from pandasai.config import load_config
  from pandasai.exceptions import UnSupportedLogicUnit
  from pandasai.helpers.df_info import DataFrameType
  from pandasai.helpers.logger import Logger
  from pandasai.pipelines.pipeline_context import PipelineContext
  from pandasai.pipelines.base_logic_unit import BaseLogicUnit
  from ..schemas.df_config import Config
  from typing import Any, Optional, List, Union
  from .abstract_pipeline import AbstractPipeline
label_desc: Use image node_id 3 for calling the Pipeline obj's underlying member method code with example usage: obj.run(data) and returns: data