private static function uploadImage(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        $url
    ) {
        $mediaService = $adWordsServices->get($session, MediaService::class);

        // Create image.
        $image = new Image();
        $image->setData(file_get_contents($url));
        $image->setType(MediaMediaType::IMAGE);

        // Upload image into the server.
        $result = $mediaService->upload([$image]);

        return $result[0]->getMediaId();
    }