class_docstr: Fuses linear chains of compatible physical operators.
class_docstr_tok: ["Fuses","linear","chains","of","compatible","physical","operators","."]
code: def _get_merged_target_max_block_size(
      self,
      up_target_max_block_size: Optional[int],
      down_target_max_block_size: Optional[int],
  ):
      if up_target_max_block_size is not None:
          # If the upstream op overrode the target max block size, we can
          # only merge if the downstream op matches or uses the default.
          assert (
              down_target_max_block_size is None
              or down_target_max_block_size == up_target_max_block_size
          )
          return up_target_max_block_size
      else:
          # Upstream op inherits the downstream op's target max block size,
          # because the downstream op is the one that outputs the final
          # blocks.
          return down_target_max_block_size
  
imports: from typing import List, Optional, Tuple
  from ray.data._internal.compute import get_compute, is_task_compute
  from ray.data._internal.execution.interfaces import PhysicalOperator, RefBundle, TaskContext
  from ray.data._internal.execution.operators.actor_pool_map_operator import ActorPoolMapOperator
  from ray.data._internal.execution.operators.base_physical_operator import AllToAllOperator
  from ray.data._internal.execution.operators.map_operator import MapOperator
  from ray.data._internal.execution.operators.task_pool_map_operator import TaskPoolMapOperator
  from ray.data._internal.logical.interfaces import PhysicalPlan, Rule
  from ray.data._internal.logical.operators.all_to_all_operator import AbstractAllToAll, RandomShuffle, Repartition
  from ray.data._internal.logical.operators.map_operator import AbstractUDFMap
  from ray.data._internal.stats import StatsDict
  from ray.data.context import DataContext
label_desc: Use image node_id 8 for calling the OperatorFusionRule obj's underlying member method code with example usage: obj._get_merged_target_max_block_size(up_target_max_block_size, down_target_max_block_size) and returns: up_target_max_block_size, down_target_max_block_size