code: def create_type_variant(cls, type_name, type_converter):
          
          assert isinstance(type_name, six.string_types)
          if not CardinalityField.matches_type(type_name):
              message = "type_name='%s' has no CardinalityField" % type_name
              raise ValueError(message)
  
          primary_name, cardinality = CardinalityField.split_type(type_name)
          if isinstance(type_converter, dict):
              type_dict = type_converter
              type_converter = type_dict.get(primary_name, None)
              if not type_converter:
                  raise MissingTypeError(primary_name)
  
          assert callable(type_converter)
          type_variant = TypeBuilder.with_cardinality(cardinality,
                                      type_converter, listsep=cls.listsep)
          type_variant.name = type_name
          return type_variant
docs: Create type variants for types with a cardinality field.
          The new type converters are based on the type converter with
          cardinality=1.
  
          .. code-block:: python
  
              import parse
  
              @parse.with_pattern(r'\d+')
              def parse_number(text):
                  return int(text)
  
              new_type = CardinalityFieldTypeBuilder.create_type_variant(
                                      "Number+", parse_number)
              new_type = CardinalityFieldTypeBuilder.create_type_variant(
                                      "Number+", dict(Number=parse_number))
  
          :param type_name:  Type name with cardinality field suffix.
          :param type_converter:  Type converter or type dictionary.
          :return: Type converter variant (function).
          :raises: ValueError, if type_name does not end with CardinalityField
          :raises: MissingTypeError, if type_converter is missing in type_dict