class_docstr: Physical operator for limit.
class_docstr_tok: ["Physical","operator","for","limit","."]
code: def __init__(
      self,
      limit: int,
      input_op: PhysicalOperator,
  ):
      self._limit = limit
      self._consumed_rows = 0
      self._buffer: Deque[RefBundle] = deque()
      self._name = f"limit={limit}"
      self._output_metadata: List[BlockMetadata] = []
      self._cur_output_bundles = 0
      super().__init__(self._name, input_op, target_max_block_size=None)
      if self._limit <= 0:
          self.all_inputs_done()
  
imports: import copy
  from collections import deque
  from typing import Deque, List, Tuple
  import ray
  from ray.data._internal.execution.interfaces import PhysicalOperator, RefBundle
  from ray.data._internal.execution.operators.base_physical_operator import OneToOneOperator
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data._internal.stats import StatsDict
  from ray.data.block import Block, BlockAccessor, BlockMetadata
  from ray.types import ObjectRef
label_desc: Use image node_id 1 to create a new LimitOperator object from inherited base classes: OneToOneOperator with example: obj = LimitOperator(limit, input_op)