code: protected function hasPricingOption($optionKey, $priceOptions)
      {
          $found = false;
  
          foreach ($priceOptions as $pog) {
              if ($pog->pricingOptionKey->pricingOptionKey === $optionKey) {
                  $found = true;
              }
          }
  
          return $found;
      }
docs: Avoid double pricing groups when combining an explicitly provided override option with a specific parameter
  that uses the same override option.
  
  @param string $optionKey
  @param PricingOption[] $priceOptions
  @return bool