private static function getCoroutineContext(string $key)
    {
        $coroutineId = self::getCoroutineId();
        if (!isset(self::$context[$coroutineId])) {
            return null;
        }

        $coroutineContext = self::$context[$coroutineId];
        if (isset($coroutineContext[$key])) {
            return $coroutineContext[$key];
        }
        return null;
    }