public static function initialize($group_name, $access_token, $opts = null) {

        if (!is_string($group_name) || strlen($group_name) == 0) {
            throw new Exception("Invalid group_name");
        }
        if (!is_string($access_token) || strlen($access_token) == 0) {
            throw new Exception("Invalid access_token");
        }

        // If the singleton has already been created, treat the initialization
        // as an options() call instead.
        if (isset(self::$_singleton)) {
            if (!isset($opts)) {
                $opts = array();
            }
            self::$_singleton->options(array_merge($opts, array(
                'group_name' => $group_name,
                'access_token' => $access_token,
            )));
        } else {
            self::$_singleton = self::newRuntime($group_name, $access_token, $opts);
        }
        return self::$_singleton;
    }