<s> from collections import OrderedDict <EOL> from graphql . core . type import GraphQLEnumType , GraphQLEnumValue <EOL> def enum_to_graphql_enum ( enumeration ) : <EOL> return GraphQLEnumType ( <EOL> name = enumeration . __name__ , <EOL> values = OrderedDict ( [ ( it . name , GraphQLEnumValue ( it . value ) ) <EOL> for it in enumeration ] ) , <EOL> description = enumeration . __doc__ <EOL> ) </s>
