code: def _device_node(self, device):
          
          label = device.ui_label
          dev_label = device.ui_device_label
          # determine available methods
          methods = [Action(method, device,
                            self._labels[method].format(label, dev_label),
                            partial(self._actions[method], device))
                     for method in self._get_device_methods(device)]
          # find the root device:
          root = device.parent_object_path
          # in this first step leave branches empty
          return device.object_path, Device(root, [], device, dev_label, methods)
docs: Create an empty menu node for the specified device.