def get_group_key(self, devices):
    'Returns a group key for the set of devices.\n\n    Args:\n      devices: list of strings naming devices in a collective group.\n\n    Returns:\n      int key uniquely identifying the set of device names.\n    '
    parsed = [pydev.DeviceSpec.from_string(d) for d in devices]
    names = sorted([('%s:%d' % (d.device_type, d.device_index)) for d in parsed])
    key_id = ','.join(names)
    with _lock:
        if (key_id not in self._group_key_table):
            new_key = self._group_key
            self._group_key += 1
            self._group_key_table[key_id] = new_key
    return self._group_key_table[key_id]
Returns a group key for the set of devices.

Args:
  devices: list of strings naming devices in a collective group.

Returns:
  int key uniquely identifying the set of device names.
def get_group_key(self, devices):
    'Returns a group key for the set of devices.\n\n    Args:\n      devices: list of strings naming devices in a collective group.\n\n    Returns:\n      int key uniquely identifying the set of device names.\n    '
    parsed = [pydev.DeviceSpec.from_string(d) for d in devices]
    names = sorted([('%s:%d' % (d.device_type, d.device_index)) for d in parsed])
    key_id = ','.join(names)
    with _lock:
        if (key_id not in self._group_key_table):
            new_key = self._group_key
            self._group_key += 1
            self._group_key_table[key_id] = new_key
    return self._group_key_table[key_id]