def METHOD_NAME(self, code: str = "en"):
    self.add_variants()
    self.assertEqual(Variant.objects.count(), 0)
    translation = self.component.translation_set.get(language_code=code)
    unit = translation.unit_set.get(context="barMin")
    unit.extra_flags = "variant:'Default string'"
    unit.save()
    self.assertEqual(Variant.objects.count(), 1)
    self.assertEqual(Variant.objects.get().unit_set.count(), 4)
    unit = translation.unit_set.get(context="barShort")
    unit.extra_flags = "variant:'Default string'"
    unit.save()
    self.assertEqual(Variant.objects.count(), 1)
    self.assertEqual(Variant.objects.get().unit_set.count(), 6)
    unit = translation.unit_set.get(context="barMin")
    unit.extra_flags = ""
    unit.save()
    self.assertEqual(Variant.objects.count(), 1)
    self.assertEqual(Variant.objects.get().unit_set.count(), 4)
    unit = translation.unit_set.get(context="barShort")
    unit.extra_flags = ""
    unit.save()
    self.assertEqual(Variant.objects.count(), 0)