code: def _get_channels_index(
      self,
      index,
      party_topic_infos,
      src_party_id,
      src_role,
      mq=None,
      conf: dict = None,
  ):
      channel_infos = []
      for e in party_topic_infos:
          # select specified topic_info for a party
          party, topic_suffix, topic_pair = e[index]
          info = self._get_channel(
              topic_pair=topic_pair,
              src_party_id=src_party_id,
              src_role=src_role,
              dst_party_id=party.party_id,
              dst_role=party.role,
              mq=mq,
              conf=conf,
          )
          channel_infos.append(info)
      return channel_infos
  
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 18 for calling the MessageQueueBasedFederation obj's underlying member method code with example usage: obj._get_channels_index(index, party_topic_infos, src_party_id, src_role, mq, conf) and returns: channel_infos