<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def positions(self, key, value):
 """Populate the positions field. Also populates the email_addresses field by side effect. """

    email_addresses = self.get("email_addresses", [])
    current = None
    record = None

    recid_or_status = force_list(value.get('z'))
    for el in recid_or_status:
        if el.lower() == 'current':
            current = True if value.get('a') else None
        else:
            record = get_record_ref(maybe_int(el), 'institutions')

    rank = normalize_rank(value.get('r'))

    current_email_addresses = force_list(value.get('m'))
    non_current_email_addresses = force_list(value.get('o'))

    email_addresses.extend({
        'value': address,
        'current': True,
    } for address in current_email_addresses)
    email_addresses.extend({
        'value': address,
        'current': False,
    } for address in non_current_email_addresses)

    self['email_addresses'] = email_addresses

    if 'a' not in value:
        return None

    return {
        'institution': value['a'],
        'record': record,
        'curated_relation': True if record is not None else None,
        'rank': rank,
        'start_date': normalize_date(value.get('s')),
        'end_date': normalize_date(value.get('t')),
        'current': current,
    }