public function findByOptionIds(ProductInterface $product, array $optionsSearchedIds = [])
    {
        sort($optionsSearchedIds);

        foreach ($product->getVariants() as $variant) {

            /**
             * @var VariantInterface $variant
             */
            $optionsConfiguredIds = array_map(
                function (ValueInterface $option) {
                    return $option->getId();
                },
                $variant->getOptions()->toArray()
            );

            sort($optionsConfiguredIds);

            if ($optionsSearchedIds == $optionsConfiguredIds) {
                /**
                 * Options match, we found the product Variant.
                 */

                return $variant;
            }
        }

        /**
         * No match, probable option misconfiguration in Variants.
         */

        return null;
    }