code: def _partition_send(
      self,
      index,
      kvs,
      name,
      tag,
      partitions,
      party_topic_infos,
      src_party_id,
      src_role,
      mq,
      max_message_size,
      conf: dict,
  ):
      channel_infos = self._get_channels_index(
          index=index,
          party_topic_infos=party_topic_infos,
          src_party_id=src_party_id,
          src_role=src_role,
          mq=mq,
          conf=conf,
      )
  
      datastream = Datastream()
      base_message_key = str(index)
      message_key_idx = 0
      count = 0
  
      for k, v in kvs:
          count += 1
          el = {"k": k.hex(), "v": v.hex()}
          # roughly caculate the size of package to avoid serialization ;)
          if (
              datastream.get_size()
              + sys.getsizeof(el["k"])
              + sys.getsizeof(el["v"])
              >= max_message_size
          ):
              LOGGER.debug(
                  f"[federation._partition_send]The size of message is: {datastream.get_size()}"
              )
              message_key_idx += 1
              message_key = (
                  base_message_key + "_" + str(message_key_idx)
              )
              self._send_kv(
                  name=name,
                  tag=tag,
                  data=datastream.get_data().encode(),
                  channel_infos=channel_infos,
                  partition_size=-1,
                  partitions=partitions,
                  message_key=message_key,
              )
              datastream.clear()
          datastream.append(el)
  
      message_key_idx += 1
      message_key = _SPLIT_.join(
          [base_message_key, str(message_key_idx)]
      )
  
      self._send_kv(
          name=name,
          tag=tag,
          data=datastream.get_data().encode(),
          channel_infos=channel_infos,
          partition_size=count,
          partitions=partitions,
          message_key=message_key,
      )
  
      return []
  
imports: import json
  import logging
  import sys
  import typing
  from typing import List
  from fate.arch.computing.api import KVTableContext
  from fate.arch.federation.api import Federation, PartyMeta, TableMeta
  from ._datastream import Datastream
  from ._parties import Party
label_desc: Use image node_id 22 for calling the MessageQueueBasedFederation obj's underlying member method code with example usage: obj._partition_send(index, kvs, name, tag, partitions, party_topic_infos, src_party_id, src_role, mq, max_message_size, conf) and returns: list