code: def _same_device(dev_a, dev_b):
      if dev_a is None or dev_b is None:
          return False
      return "/" + ":".join(
          dev_a[1:].split(":")[-2:]
      ) == "/" + ":".join(dev_b[1:].split(":")[-2:])
  
imports: import tensorflow
  from typing import Union, Optional
  import ivy
  from ivy.functional.ivy.device import Profiler
label_desc: Use image node_id 1 for calling a global function with example usage: _same_device(dev_a, dev_b) and returns: unknown, False