def add_field(self, key, field):
    if key in self._fields:
      raise PayloadFieldAlreadyDefinedError(
        'Key {key} is already set on this payload. The existing field was {existing_field}.'
        ' Tried to set new field {field}.'
        .format(key=key, existing_field=self._fields[key], field=field))
    elif self._frozen:
      raise PayloadFrozenError(
        'Payload is frozen, field with key {key} cannot be added to it.'
        .format(key=key))
    else:
      self._fields[key] = field
      self._fingerprint_memo = None
Returns a dict of all of the system groups as keys, and group ids
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/base/payload.py/Payload.add_field--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/get_group_dict