code: public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) {
      try {
        return reader.read(null, decoder);
      } catch (IOException e) {
        throw new SerializationException("Could not deserialize Avro entity", e);
      }
    }
docs: Decode an entity from the initialized Avro Decoder using the DatumReader.
  
  @param decoder
  The decoder to decode the entity fields
  @param reader
  The Avro DatumReader that will read the entity with the decoder.
  @return The entity.