Takes the "global ID" created by toGlobalID, and retuns the type name and ID
    used to create it.
333903
def from_global_id(global_id):
    '''
    
    '''
    unbased_global_id = unbase64(global_id)
    _type, _id = unbased_global_id.split(':', 1)
    return _type, _id
1110904
private static String createTypeId(Type type) {
        if (type instanceof Class<?>)
            return Class.class.cast(type).getName();

        if (type instanceof ParameterizedType)
            return createTypeId(((ParameterizedType) type).getRawType())
                + Stream.of(((ParameterizedType) type).getActualTypeArguments())
                .map(CdiSpiHelper::createTypeId)
                .collect(joining(",", "<", ">"));

        if (type instanceof TypeVariable<?>)
            return TypeVariable.class.cast(type).getName();

        if (type instanceof GenericArrayType)
            return createTypeId(GenericArrayType.class.cast(type).getGenericComponentType());

        throw new UnsupportedOperationException("Unable to create type id for type [" + type + "]");
    }
1175606
def move_to_global_scope(self, id_):
        
        # In the current scope and more than 1 scope?
        if id_ in self.table[self.current_scope].keys(filter_by_opt=False) and len(self.table) > 1:
            symbol = self.table[self.current_scope][id_]
            symbol.offset = None
            symbol.scope = SCOPE.global_
            if symbol.class_ != CLASS.label:
                symbol.mangled = "%s%s%s" % (self.table[self.global_scope].mangle, global_.MANGLE_CHR, id_)

            self.table[self.global_scope][id_] = symbol
            del self.table[self.current_scope][id_]  # Removes it from the current scope
            __DEBUG__("'{}' entry moved to global scope".format(id_))
405534
@Nonnull
  public static IGlobalScope onGlobalBegin (@Nonnull @Nonempty final String sScopeID)
  {
    return onGlobalBegin (sScopeID, GlobalScope::new);
  }
344193
public static function fromGlobalId($globalId) {
        $unbasedGlobalId = base64_decode($globalId);
        $delimiterPos = strpos($unbasedGlobalId, GLOBAL_ID_DELIMITER);
        return [
            'type' => substr($unbasedGlobalId, 0, $delimiterPos),
            'id' => substr($unbasedGlobalId, $delimiterPos + 1)
        ];
    }
1371088
function getGlobal () {
    // return global data if defined
    if (defined(global.__immutable_core__)) {
        return global.__immutable_core__   
    }
    // create global data object
    global.__immutable_core__ = {}
    // initialize global defaults
    reset()
    // return global data
    return global.__immutable_core__
}
519062
public static GlobalParameter create(DbConn cnx, String key, String value)
    {
        QueryResult r = cnx.runUpdate("globalprm_insert", key, value);
        GlobalParameter res = new GlobalParameter();
        res.id = r.getGeneratedId();
        res.key = key;
        res.value = value;
        return res;
    }
328954
def generate_id():
    
    global _current_pid

    pid = os.getpid()
    if _current_pid != pid:
        _current_pid = pid
        _rnd.seed(int(1000000 * time.time()) ^ pid)
    id = format(_rnd.randint(0, 18446744073709551615), '02x')

    if len(id) < 16:
        id = id.zfill(16)

    return id
115460
@Override
    public void replayCompletion(String globalId) {
        if (rc == null) {
            // Find a factory to create the RecoveryCoordinator
            try {
                rc = getRecoveryCoordinator();
            } catch (RecoveryCoordinatorNotAvailableException e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "replayCompletion", e);
            }
        }

        if (rc != null) {
            rc.replayCompletion(globalId);
        }
    }
1315128
@Override
  public IdType toUnqualified() {
    if (isLocal() || isUrn()) {
      return new IdType(getValueAsString());
    }
    return new IdType(getResourceType(), getIdPart(), getVersionIdPart());
  }
157966
function createId (coll) {
  var _ = this
  var idProperty = _.__id()
  if (_.isEmpty(coll)) {
    return 1
  } else {
    var id = _.maxBy(coll, function (doc) {
      return doc[idProperty]
    })[idProperty]

    if (_.isFinite(id)) {
      // Increment integer id
      return ++id
    } else {
      // Generate string id
      return uuid()
    }
  }
}
125752
public <T> Local<T> newLocal(TypeId<T> type) {
        if (localsInitialized) {
            throw new IllegalStateException("Cannot allocate locals after adding instructions");
        }
        Local<T> result = Local.get(this, type);
        locals.add(result);
        return result;
    }
319464
def _create_id(self):
    """"""
    cursor = self._db.cursor()
    cursor.execute('INSERT INTO Ids DEFAULT VALUES')
    return cursor.lastrowid
730709
function defaultInsertDelayed (insertDelayed) {
    // set insertDelayed
    if (defined(insertDelayed)) {
        getGlobal().defaultInsertDelayed = !!insertDelayed
        // return class when setting
        return ImmutableCoreModel
    }
    // return insertDelayed
    return getGlobal().defaultInsertDelayed
}
1185690
public boolean validateGlobalType(GlobalType globalType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(globalType, diagnostics, context);
	}
867651
private static <T> void fillGeneratedId(final T target,
                                           final Introspected introspected,
                                           final PreparedStatement stmt,
                                           final boolean checkExistingId) throws SQLException {
      if (!introspected.hasGeneratedId()) {
         return;
      }

      final FieldColumnInfo fcInfo = introspected.getGeneratedIdFcInfo();
      if (checkExistingId) {
         final Object idExisting = introspected.get(target, fcInfo);
         if (idExisting != null && (!(idExisting instanceof Integer) || (Integer) idExisting > 0)) {
            // a bit tied to implementation but let's assume that integer id <= 0 means that it was not generated yet
            return;
         }
      }
      try (final ResultSet generatedKeys = stmt.getGeneratedKeys()) {
         if (generatedKeys.next()) {
            introspected.set(target, fcInfo, generatedKeys.getObject(1));
         }
      }
   }
1203297
def generate_new_id(self):
        
        self.events.append(Event())
        indiv_id = self.indiv_counter
        self.indiv_counter += 1
        return indiv_id