@classmethod<EOL><INDENT>def decode_metadata_response(cls, data):<DEDENT>
((correlation_id, numbrokers), cur) = relative_unpack('<STR_LIT>', data, <NUM_LIT:0>)<EOL>brokers = []<EOL>for _ in range(numbrokers):<EOL><INDENT>((nodeId, ), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>(host, cur) = read_short_string(data, cur)<EOL>((port,), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>brokers.append(BrokerMetadata(nodeId, host, port))<EOL><DEDENT>((num_topics,), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>topic_metadata = []<EOL>for _ in range(num_topics):<EOL><INDENT>((topic_error,), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>(topic_name, cur) = read_short_string(data, cur)<EOL>((num_partitions,), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>partition_metadata = []<EOL>for _ in range(num_partitions):<EOL><INDENT>((partition_error_code, partition, leader, numReplicas), cur) =relative_unpack('<STR_LIT>', data, cur)<EOL>(replicas, cur) = relative_unpack(<EOL>'<STR_LIT>' % numReplicas, data, cur)<EOL>((num_isr,), cur) = relative_unpack('<STR_LIT>', data, cur)<EOL>(isr, cur) = relative_unpack('<STR_LIT>' % num_isr, data, cur)<EOL>partition_metadata.append(<EOL>PartitionMetadata(topic_name, partition, leader,<EOL>replicas, isr, partition_error_code)<EOL>)<EOL><DEDENT>topic_metadata.append(<EOL>TopicMetadata(topic_name, topic_error, partition_metadata)<EOL>)<EOL><DEDENT>return MetadataResponse(brokers, topic_metadata)<EOL>
Decode bytes to a MetadataResponse

Arguments:
    data: bytes to decode