code: def to_dict(self) -> Dict[str, object]:
      ret: Dict[str, object] = {
          "include_all_non_op_selectives": self.include_all_non_op_selectives,
          "include_all_operators": self.include_all_operators,
      }
      operators = {}
      for op_name, op in self.operators.items():
          operators[op_name] = op.to_dict()
      ret["operators"] = operators
  
      if self._debug_info is not None:
          ret["debug_info"] = sorted(self._debug_info)
  
      ret["kernel_metadata"] = {
          k: sorted(v) for (k, v) in self.kernel_metadata.items()
      }
  
      ret["et_kernel_metadata"] = self.et_kernel_metadata
  
      ret["custom_classes"] = sorted(self.custom_classes)
  
      ret["build_features"] = sorted(self.build_features)
  
      return ret
  
imports: from collections import defaultdict
  from collections.abc import Iterable
  from dataclasses import dataclass
  from typing import Dict, List, Optional, Set, Tuple
  import yaml
  from torchgen.model import NativeFunction
  from torchgen.selective_build.operator import merge_debug_info, merge_operator_dicts, SelectiveBuildOperator, strip_operator_overload_name
label_desc: Use image node_id 13 for calling the SelectiveBuilder obj's underlying member method code with example usage: obj.to_dict() and returns: ret