code: def is_compatible(self, mem_type: MemoryType) -> bool:
      if self is DeviceType.device:
          return mem_type.is_device_accessible
      else:
          return mem_type.is_host_accessible
  
file_path: cuml/python/cuml/internals/device_type.py
imports: from enum import Enum, auto
  from cuml.internals.mem_type import MemoryType
label_desc: Use image node_id 2 for calling the DeviceType obj's underlying member method code with example usage: obj.is_compatible(mem_type) and returns: mem_type, mem_type