private function addProductAttributesToVariation(Product $product, array $candidatesForProcessing = [])
    {
        return array_map(function (TransferObjectInterface $object) use ($product) {
            if (!($object instanceof Variation)) {
                return $object;
            }

            $object->setAttributes(array_merge($object->getAttributes(), $product->getAttributes()));

            return $object;
        }, $candidatesForProcessing);
    }
private function addProductAttributesToVariation(Product $product, array $candidatesForProcessing = [])
    {
        return array_map(function (TransferObjectInterface $object) use ($product) {
            if (!($object instanceof Variation)) {
                return $object;
            }

            $object->setAttributes(array_merge($object->getAttributes(), $product->getAttributes()));

            return $object;
        }, $candidatesForProcessing);
    }
@param Product                   $product
@param TransferObjectInterface[] $candidatesForProcessing

@return TransferObjectInterface[]