code: def serialize_distribution(network_agents, known_modules=[]):
      '''
      When serializing an agent distribution, remove the thresholds, in order
      to avoid cluttering the YAML definition file.
      '''
      d = deepcopy(list(network_agents))
      for v in d:
          if 'threshold' in v:
              del v['threshold']
          v['agent_type'] = serialize_type(v['agent_type'],
                                           known_modules=known_modules)
      return f serialize_distribution(network_agents, known_modules=[]):
      '''
      When serializing an agent distribution, remove the thresholds, in order
      to avoid cluttering the YAML definition file.
      '''
      d = deepcopy(list(network_agents))
      for v in d:
          if 'threshold' in v:
              del v['threshold']
          v['agent_type'] = serialize_type(v['agent_type'],
                                           known_modules=known_modules)
      return d
docs: When serializing an agent distribution, remove the thresholds, in order
      to avoid cluttering the YAML definition file.