private static function restrictFeedItemToGeoTarget(
        AdWordsServices $adWordsServices,
        AdWordsSession $session,
        FeedItem $feedItem,
        $locationId
    ) {
        $feedItemTargetService = $adWordsServices->get(
            $session,
            FeedItemTargetService::class
        );

        // Optional: Restrict the feed item to only serve with ads for the
        // specified geo target.
        $feedItemCriterionTarget = new FeedItemCriterionTarget();
        $feedItemCriterionTarget->setFeedId($feedItem->getFeedId());
        $feedItemCriterionTarget->setFeedItemId($feedItem->getFeedItemId());

        $location = new Location();
        // The IDs can be found in the documentation or retrieved with the
        // LocationCriterionService.
        $location->setId($locationId);
        $feedItemCriterionTarget->setCriterion($location);

        // Create a feed item target operation.
        $operation = new FeedItemTargetOperation();
        $operation->setOperand($feedItemCriterionTarget);
        $operation->setOperator(Operator::ADD);

        // Create the feed item target on the server and print out
        // some information.
        $result = $feedItemTargetService->mutate([$operation]);
        $feedItemCriterionTarget = $result->getValue()[0];
        printf(
            'Feed item target for feed ID %d and feed item ID %d was '
            . 'created to restrict serving to location ID %d.%s',
            $feedItemCriterionTarget->getFeedId(),
            $feedItemCriterionTarget->getFeedItemId(),
            $feedItemCriterionTarget->getCriterion()->getId(),
            PHP_EOL
        );
    }