private static function createSmartShoppingAdGroup(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        $campaignId
    ) {
        $adGroupService =
            $adWordsServices->get($session, AdGroupService::class);

        // Create an ad group.
        $adGroup = new AdGroup();
        $adGroup->setCampaignId($campaignId);
        $adGroup->setName('Smart Shopping ad group #' . uniqid());

        // Set the ad group type to SHOPPING_GOAL_OPTIMIZED_ADS.
        $adGroup->setAdGroupType(AdGroupType::SHOPPING_GOAL_OPTIMIZED_ADS);

        // Create operation.
        $adGroupOperation = new AdGroupOperation();
        $adGroupOperation->setOperand($adGroup);
        $adGroupOperation->setOperator(Operator::ADD);

        // Create the ad group on the server and print out some information.
        $addedAdGroup = $adGroupService->mutate([$adGroupOperation])
            ->getValue()[0];
        printf(
            "Smart Shopping ad group with name '%s' and ID %d was added.%s",
            $addedAdGroup->getName(),
            $addedAdGroup->getId(),
            PHP_EOL
        );

        return $addedAdGroup->getId();
    }