def METHOD_NAME(cls, info: ResolveInfo, instance, cleaned_data):
    super().METHOD_NAME(info, instance, cleaned_data)
    product_attributes = cleaned_data.get("product_attributes")
    variant_attributes = cleaned_data.get("variant_attributes")
    if product_attributes is not None:
        instance.product_attributes.set(product_attributes)
    if variant_attributes is not None:
        instance.variant_attributes.set(variant_attributes)