'Create (or open) a sub-key at the specified relative path. When opening instead of creating, use open_mode'

def sub_key(self, path, allow_create=True, open_mode=KEY_READ):

    if allow_create:
        return Key(create_at=path, root=self.hkey)
    return Key(open_at=path, root=self.hkey)
