def plot_pie_measurement_channel(measurements_obj: measurements.Measurements,
                                 channel_name: str,
                                 group_by: str = 'player',
                                 value: str = 'value_str') -> None:
  """Plots a pie chart of a measurement channel."""
  if channel_name not in measurements_obj.available_channels():
    raise ValueError(f'Unknown channel: {channel_name}')

  channel = measurements_obj.get_channel(channel_name)
  data = []
  channel.subscribe(on_next=data.append)
  scale = set()
  for datum in data:
    scale |= {datum['value_str']}

  plot_df_pie(pd.DataFrame(data), scale, channel_name, group_by=group_by,
              value=value)
Plots a pie chart of a measurement channel.
concordia/utils/plotting.py