class_docstr: Wraps a device specification (DeviceSpec or str) with merge functionality.
  
  When called, this class will merge a node_def with its own spec. It also
  exposes a `shortcut_string_merge` method which can significantly improve
  performance of device placement.
class_docstr_tok: ["Wraps","a","device","specification","(","DeviceSpec","or","str",")","with","merge","functionality",".","When","called",",","this","class","will","merge","a","node_def","with","its","own","spec",".","It","also","exposes","a","`","shortcut_string_merge","`","method","which","can","significantly","improve","performance","of","device","placement","."]
code: def __repr__(self):
      return "{} (spec: {})".format(
          super(MergeDevice, self).__repr__(), self._spec.to_string()
      )
  
file_path: tensorflow/tensorflow/python/framework/device.py
imports: from tensorflow.python import tf2
  from tensorflow.python.framework import device_spec
label_desc: Use image node_id 4 for calling the MergeDevice obj's underlying member method code with example usage: obj.__repr__() and returns: str