code: def encode_metadata_request(cls, client_id, correlation_id, topics=None):
          
          topics = [] if topics is None else topics
          message = [
              cls._encode_message_header(client_id, correlation_id,
                                         KafkaCodec.METADATA_KEY),
              struct.pack('>i', len(topics)),
          ]
          for topic in topics:
              message.append(write_short_ascii(topic))
          return b''.join(message)
docs: Encode a MetadataRequest
  
          :param bytes client_id: string
          :param int correlation_id: int
          :param list topics: list of text