code: @Override
    public NamingLookupResponse decode(final byte[] buf) {
      final AvroNamingLookupResponse avroResponse = AvroUtils.fromBytes(buf, AvroNamingLookupResponse.class);
      final List<NameAssignment> nas = new ArrayList<>(avroResponse.getTuples().size());
      for (final AvroNamingAssignment tuple : avroResponse.getTuples()) {
        nas.add(
            new NameAssignmentTuple(
                factory.getNewInstance(tuple.getId().toString()),
                new InetSocketAddress(tuple.getHost().toString(), tuple.getPort())
            )
        );
      }
      return new NamingLookupResponse(nas);
    }
docs: Decodes bytes to an iterable of name assignments.
  
  @param buf the byte array
  @return a naming lookup response
  @throws org.apache.reef.io.network.naming.exception.NamingRuntimeException