code: def is_operator_selected_for_training(self, name: str) -> bool:
      if not self.is_operator_selected(name):
          return False
      if self.include_all_operators:
          return True
  
      not_training_op = SelectiveBuildOperator(
          name="",
          is_root_operator=False,
          is_used_for_training=False,
          include_all_overloads=False,
          _debug_info=None,
      )
      op = not_training_op
      if name in self.operators:
          op = self.operators[name]
  
      name = strip_operator_overload_name(name)
      base_op = not_training_op
      if name in self.operators:
          base_op = self.operators[name]
  
      return op.is_used_for_training or (
          base_op.include_all_overloads and base_op.is_used_for_training
      )
  
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 8 for calling the SelectiveBuilder obj's underlying member method code with example usage: obj.is_operator_selected_for_training(name) and returns: unknown, False, True