'An enum is encoded by a int, representing the zero-based position
of the symbol in the schema.'

def read_enum(self, writers_schema, readers_schema, decoder):

    index_of_symbol = decoder.read_int()
    if (index_of_symbol >= len(writers_schema.symbols)):
        fail_msg = ("Can't    access    enum    index    %d    for    enum    with    %d    symbols" % (index_of_symbol, len(writers_schema.symbols)))
        raise SchemaResolutionException(fail_msg, writers_schema, readers_schema)
    read_symbol = writers_schema.symbols[index_of_symbol]
    if (read_symbol not in readers_schema.symbols):
        fail_msg = ("Symbol    %s    not    present    in    Reader's    Schema" % read_symbol)
        raise SchemaResolutionException(fail_msg, writers_schema, readers_schema)
    return read_symbol
