public function updateOrCreateProductAttributeForProduct(
        ProductInterface $product,
        Attribute $attribute,
        array $attributeData,
        $locale
    ) {
        // Check if ProductAttribute already exists for attribute
        $existingProductAttribute = $this->retrieveProductAttributeByAttribute(
            $product,
            $attribute
        );

        // If product-attribute already exists we just need to update the translation.
        if ($existingProductAttribute) {
            $this->setOrCreateAttributeValueTranslation(
                $existingProductAttribute->getAttributeValue(),
                $attributeData['attributeValueName'],
                $locale
            );

            return;
        }

        // Create new AttributeValue and ProductAttribute.
        $attributeValue = $this->createAttributeValue(
            $attribute,
            $attributeData['attributeValueName'],
            $locale
        );
        $this->createProductAttribute(
            $attribute,
            $product,
            $attributeValue
        );
    }