code: def test_kernel_dtypes(self):
      yaml_config = """
  kernel_metadata:
    add_kernel:
      - int8
      - int32
    sub_kernel:
      - int16
      - int32
    add/sub_kernel:
      - float
      - complex
  """
  
      selector = SelectiveBuilder.from_yaml_str(yaml_config)
  
      self.assertTrue(
          selector.is_kernel_dtype_selected("add_kernel", "int32")
      )
      self.assertTrue(
          selector.is_kernel_dtype_selected("add_kernel", "int8")
      )
      self.assertFalse(
          selector.is_kernel_dtype_selected("add_kernel", "int16")
      )
      self.assertFalse(
          selector.is_kernel_dtype_selected("add1_kernel", "int32")
      )
      self.assertFalse(
          selector.is_kernel_dtype_selected("add_kernel", "float")
      )
  
      self.assertTrue(
          selector.is_kernel_dtype_selected("add/sub_kernel", "float")
      )
      self.assertTrue(
          selector.is_kernel_dtype_selected("add/sub_kernel", "complex")
      )
      self.assertFalse(
          selector.is_kernel_dtype_selected("add/sub_kernel", "int16")
      )
      self.assertFalse(
          selector.is_kernel_dtype_selected("add/sub_kernel", "int32")
      )
  
file_path: pytorch/tools/test/test_selective_build.py
imports: import unittest
  from torchgen.selective_build.operator import *
  from torchgen.model import Location, NativeFunction
  from torchgen.selective_build.selector import combine_selective_builders, SelectiveBuilder
label_desc: Use image node_id 5 for calling the TestSelectiveBuild obj's underlying member method code with example usage: obj.test_kernel_dtypes() without return types