def _GetChannelIndicesInChannelDataIdList(id_list):
  """Returns a list of all the unique channel indices requested."""
  channel_indices = []
  for ch in id_list:
    if ch.HasField('bipolar_channel'):
      request_indices = [
          ch.bipolar_channel.index, ch.bipolar_channel.referential_index
      ]
    else:
      request_indices = [ch.single_channel.index]
    channel_indices = channel_indices + request_indices
  return list(set(channel_indices))