class_docstr: The execution state tracked for each PhysicalOperator.
  
  This tracks state to manage input and output buffering for StreamingExecutor and
  progress bars, which is separate from execution state internal to the operators.
  
  Note: we use the `deque` data structure here because it is thread-safe, enabling
  operator queues to be shared across threads.
docstr: Return the number of queued bundles across all inqueues.
docstr_tok: ["Return","the","number","of","queued","bundles","across","all","inqueues","."]
code: def num_queued(self) -> int:
      """Return the number of queued bundles across all inqueues."""
      return sum(len(q) for q in self.inqueues)
  
imports: import math
  import threading
  import time
  from collections import defaultdict, deque
  from dataclasses import dataclass
  from typing import Dict, List, Optional, Tuple
  import ray
  from ray.data._internal.dataset_logger import DatasetLogger
  from ray.data._internal.execution.autoscaling_requester import get_or_create_autoscaling_requester_actor
  from ray.data._internal.execution.backpressure_policy import BackpressurePolicy
  from ray.data._internal.execution.interfaces import ExecutionOptions, ExecutionResources, PhysicalOperator, RefBundle
  from ray.data._internal.execution.interfaces.physical_operator import DataOpTask, MetadataOpTask, OpTask, Waitable
  from ray.data._internal.execution.operators.base_physical_operator import AllToAllOperator
  from ray.data._internal.execution.operators.input_data_buffer import InputDataBuffer
  from ray.data._internal.execution.util import memory_string
  from ray.data._internal.progress_bar import ProgressBar
  from ray.data.context import DataContext
label_desc: Use image node_id 5 for calling the OpState obj's underlying member method code with example usage: obj.num_queued() and returns: sum