code: def __init__(
      self,
      graph_module: GraphModule,
      operator_support: OperatorSupportBase,
      allows_single_node_partition: bool = False,
      non_compute_ops: Optional[Sequence[str]] = None,
      allowed_single_node_partition_ops: Optional[Sequence[str]] = None,
  ) -> None:
      self.graph_module = graph_module
      self.operator_support = operator_support
      self.allows_single_node_partition = allows_single_node_partition
      self.non_compute_ops = (
          non_compute_ops if non_compute_ops is not None else []
      )
      self.allowed_single_node_partition_ops = (
          allowed_single_node_partition_ops
          if allowed_single_node_partition_ops is not None
          else []
      )
  
imports: from typing import Dict, List, Set, Iterable, Sequence, Optional, Deque
  from torch.fx.passes.utils.fuser_utils import fuse_by_partitions
  from torch.fx.graph_module import GraphModule
  from torch.fx.node import Node, _get_qualified_name
  from torch.fx.passes.operator_support import OperatorSupportBase
  import logging
  import itertools
  from copy import copy
  from collections import deque
label_desc: Use image node_id 1 to create a new CapabilityBasedPartitioner object  with example: obj = CapabilityBasedPartitioner(graph_module, operator_support, allows_single_node_partition, non_compute_ops, allowed_single_node_partition_ops)