code: def create_choice_attribute(creator_type, value, choice_entry):
      
  
      klass = creator_type.get_class_for_value(value)
      return klass(value, choice_entry)
docs: Create an instance of a subclass of ChoiceAttributeMixin for the given value.
  
      Parameters
      ----------
      creator_type : type
          ``ChoiceAttributeMixin`` or a subclass, from which we'll call the ``get_class_for_value``
          class-method.
      value : ?
          The value for which we want to create an instance of a new subclass of ``creator_type``.
      choice_entry: ChoiceEntry
          The ``ChoiceEntry`` instance that hold the current value, used to access its constant,
          value and display name.
  
      Returns
      -------
      ChoiceAttributeMixin
          An instance of a subclass of ``creator_type`` for the given value