'Register a set of configuration names.
Args:
prefix: A shared prefix for the configuration names being registered.
If the prefix doesn\'t end in \'_\', that character is appended.
mapping: A dict mapping suffix strings to default values.
Returns:
A ConfigHandle instance.
It\'s okay to re-register the same prefix: the mappings are merged,
and for duplicate suffixes the most recent registration wins.'

def register(self, prefix, mapping):

    if (not prefix.endswith('_')):
        prefix += '_'
    self._lock.acquire()
    try:
        handle = self._registrations.get(prefix)
        if (handle is None):
            handle = ConfigHandle(prefix, self)
            self._registrations[prefix] = handle
    finally:
        self._lock.release()
    handle._update_defaults(mapping)
    return handle
