(encoder, datum, schema, named_schemas, fname)
An enum is encoded by a int, representing the zero-based position of
    the symbol in the schema.
An enum is encoded by a int, representing the zero-based position of
    the symbol in the schema.
An enum is encoded by a int representing the zero - based position of the symbol in the schema .
def write_enum(encoder, datum, schema, named_schemas, fname):
    """An enum is encoded by a int, representing the zero-based position of
    the symbol in the schema."""
    index = schema["symbols"].index(datum)
    encoder.write_enum(index)
def write_enum ( encoder , datum , schema , named_schemas , fname ) : index = schema [ "symbols" ] . index ( datum ) encoder . write_enum ( index )