code: def enum_from_yaml(cls: Type[T_EnumFromYAML], constructor: Constructor, node: ruamel.yaml.nodes.ScalarNode) -> T_EnumFromYAML:
      
      # mypy doesn't like indexing to construct the enumeration.
      return cls[node.value]
docs: Decode YAML representation.
  
      This is a mixin method for reading enum values from YAML. It needs to be added to the enum
      as a classmethod. See the module docstring for further information on this approach and how
      to implement it.
  
      Note:
          This method assumes that the name of the enumeration value was stored as a scalar node.
  
      Args:
          constructor: Constructor from the YAML object.
          node: Scalar node extracted from the YAML being read.
      Returns:
          The constructed YAML value from the name of the enumerated value.