class_docstr: Encapsulates the data transformation logic of a physical MapOperator.
  
  A MapTransformer may consist of one or more steps, each of which is represented
  as a MapTransformFn. The first MapTransformFn must take blocks as input, and
  the last MapTransformFn must output blocks. The intermediate data types can
  be blocks, rows, or batches.
class_docstr_tok: ["Encapsulates","the","data","transformation","logic","of","a","physical","MapOperator",".","A","MapTransformer","may","consist","of","one","or","more","steps",",","each","of","which","is","represented","as","a","MapTransformFn",".","The","first","MapTransformFn","must","take","blocks","as","input",",","and","the","last","MapTransformFn","must","output","blocks",".","The","intermediate","data","types","can","be","blocks",",","rows",",","or","batches","."]
docstr: Args:
  transform_fns: A list of `MapTransformFn`s that will be executed sequentially
      to transform data.
  init_fn: A function that will be called before transforming data.
      Used for the actor-based map operator.
docstr_tok: ["Args",":","transform_fns",":","A","list","of","`","MapTransformFn","`","s","that","will","be","executed","sequentially","to","transform","data",".","init_fn",":","A","function","that","will","be","called","before","transforming","data",".","Used","for","the","actor-based","map","operator","."]
code: def __init__(
      self,
      transform_fns: List[MapTransformFn],
      init_fn: Optional[Callable[[], None]] = None,
  ):
      """
      Args:
      transform_fns: A list of `MapTransformFn`s that will be executed sequentially
          to transform data.
      init_fn: A function that will be called before transforming data.
          Used for the actor-based map operator.
      """
      self.set_transform_fns(transform_fns)
      self._init_fn = init_fn if init_fn is not None else lambda: None
      self._target_max_block_size = None
  
imports: import itertools
  from abc import abstractmethod
  from enum import Enum
  from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union
  from ray.data._internal.block_batching.block_batching import batch_blocks
  from ray.data._internal.execution.interfaces.task_context import TaskContext
  from ray.data._internal.output_buffer import BlockOutputBuffer
  from ray.data.block import Block, BlockAccessor, DataBatch
label_desc: Use image node_id 1 to create a new MapTransformer object  with example: obj = MapTransformer(transform_fns, init_fn)