Gets a unique ID for each object.
508753
def statsId(obj):
  """"""
  if hasattr(obj, ID_KEY):
    return getattr(obj, ID_KEY)
  newId = next(NEXT_ID)
  setattr(obj, ID_KEY, newId)
  return newId
146660
function getId(record) {
    Validate.isObject(record);
    Validate.notNull(record);

    for (var property in record) {
        if (property.toLowerCase() === idPropertyName.toLowerCase()) {
            return record[property];
        }
    }
}
845891
private static String generateUniqueId(Set<String> ids, String idBase) {
		String id = idBase;
		int counter = 1;
		while (ids.contains(id)) {
			id = idBase + String.valueOf(counter++);
		}
		
		// put the newly generated one into the set
		ids.add(id);
		return id;
	}
290901
def get_ids(cs):
    """"""
    records = []
    for c in cs:
        records.append({k: c[k] for k in c if k in {'names', 'labels'}})
    return records
194530
def ids(self):
        """"""
        assert self.name == "Materials"
        ids = list()
        for attr in self.attrs:
            attr_obj = getattr(self, attr)
            if hasattr(attr_obj, 'Id'):
                ids.append(getattr(attr_obj, 'Id'))
        return ids
16909
String getNextAlgorithmObjectId() {
		if (idsToAlgorithms.size() == Integer.MAX_VALUE) {
			throw new IllegalArgumentException(
					"Maximum number of algorithm objects reached");
		}
		while (true) {
			String candidate = "ALGORITHM_" + currentAlgorithmId++;
			if (isUniqueAlgorithmObjectId(candidate)) {
				return candidate;
			}
		}
	}
263193
def get_obj_id(self, item):
        
        if item is not None:
            if isinstance(item, six.string_types):
                return item
            elif hasattr(item, 'id'):
                return item.id
242015
public Optional<UUID> getId(final Object object) {
        return Optional.ofNullable(objectToId.get(object));
    }
1229720
private static List<String> getElementsId(List<Element> elementList) {
        List<String> result = new ArrayList<String>();

        for (Element element : elementList) {
            result.add(element.getAttribute("id"));
        }

        return result;
    }
1371818
def ids(self, content_ids, object_ids):
        """"""
        result = []

        content_ids = self.split(content_ids, False)
        object_ids = self.split(object_ids)

        for cid in content_ids:
            result.append('{}:{}'.format(cid, ':'.join(object_ids)))

        return result
472936
def duplicate_ids(instance):
    
    if instance['type'] != 'bundle' or 'objects' not in instance:
        return

    unique_ids = {}
    for obj in instance['objects']:
        if 'id' not in obj or 'modified' not in obj:
            continue
        elif obj['id'] not in unique_ids:
            unique_ids[obj['id']] = obj['modified']
        elif obj['modified'] == unique_ids[obj['id']]:
            yield JSONError("Duplicate ID '%s' has identical `modified` timestamp."
                            " If they are different versions of the same object, "
                            "they should have different `modified` properties."
                            % obj['id'], instance['id'], 'duplicate-ids')
995451
def generate_id(self, obj):
        """"""
        object_type = type(obj).__name__.lower()
        return '{}_{}'.format(object_type, self.get_object_id(obj))
1096955
def get_id_by_name(self, obj, name):
        
        list = self.list(obj, filter='name = "{}"'.format(name),
                         only_id=True, limit=1)
        return list[name] if name in list.keys() else False
288687
def _unique_id(self, prefix):
        
        _id = self._id_gen
        self._id_gen += 1
        return prefix + str(_id)
851422
def unique_id(self) -> str:
        
        if not self._unique_id:
            id_list = [item.mediaid for item in self.get_items()]
            id_list.sort()
            self._unique_id = str().join([str(self.owner_id)] + list(map(str, id_list)))
        return self._unique_id
633265
public Object[] getObjectIds(Object object) {
        DimIProxy action = new DimIProxy(this, IPROXY_OBJECT_IDS);
        action.object = object;
        action.withContext();
        return action.objectArrayResult;
    }
988473
def get_item_ids(self):
        """"""
        item_ids = []
        if self.has_items():
            for idstr in self._my_map['itemIds']:
                item_ids.append(idstr)
        return IdList(item_ids)