code: def _get_n_reducers(subtask: Subtask) -> int:
      return len(
          [
              r
              for r in subtask.chunk_graph
              if isinstance(r.op, MapReduceOperand)
              and r.op.stage == OperandStage.reduce
          ]
      )
  
imports: import asyncio
  import logging
  import sys
  from collections import defaultdict
  from typing import Dict, List, Optional, Set
  from .....None import oscar
  from .....core import ChunkGraph, TileContext
  from .....core.operand import Fetch, MapReduceOperand, OperandStage, ShuffleProxy
  from .....lib.aio import alru_cache
  from .....oscar.profiling import ProfilingData
  from .....resource import Resource
  from .....typing import TileableType, BandType
  from .....utils import Timer
  from ....context import ThreadedServiceContext
  from ....cluster.api import ClusterAPI
  from ....lifecycle.api import LifecycleAPI
  from ....meta.api import MetaAPI
  from ....scheduling import SchedulingAPI
  from ....subtask import Subtask, SubtaskResult, SubtaskStatus, SubtaskGraph
  from ...core import Task
  from ..api import TaskExecutor, register_executor_cls
  from ..utils import ResultTileablesLifecycle
  from .config import MarsExecutionConfig
  from .resource import ResourceEvaluator
  from .stage import TaskStageProcessor
label_desc: Use image node_id 1 for calling a global function with example usage: _get_n_reducers(subtask) and returns: len