<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def name2marc(self, key, value):
 """Populates the ``100`` field. Also populates the ``400``, ``880``, and ``667`` fields through side effects. """

    result = self.get('100', {})

    result['a'] = value.get('value')
    result['b'] = value.get('numeration')
    result['c'] = value.get('title')
    result['q'] = value.get('preferred_name')

    if 'name_variants' in value:
        self['400'] = [{'a': el} for el in value['name_variants']]
    if 'native_names' in value:
        self['880'] = [{'a': el} for el in value['native_names']]
    if 'previous_names' in value:
        prev_names = [
            {'a': u'Formerly {}'.format(prev_name)}
            for prev_name in value['previous_names']
        ]
        self['667'] = prev_names

    return result