public function col_retentionperiod($expiredctx) {
        $purpose = $this->get_purpose_for_expiry($expiredctx);

        $expiries = [];

        $expiry = html_writer::tag('dt', get_string('default'), ['class' => 'col-sm-3']);
        if ($expiredctx->get('defaultexpired')) {
            $expiries[get_string('default')] = get_string('expiredrolewithretention', 'tool_dataprivacy', (object) [
                    'retention' => api::format_retention_period(new \DateInterval($purpose->get('retentionperiod'))),
                ]);
        } else {
            $expiries[get_string('default')] = get_string('unexpiredrolewithretention', 'tool_dataprivacy', (object) [
                    'retention' => api::format_retention_period(new \DateInterval($purpose->get('retentionperiod'))),
                ]);
        }

        if (!$expiredctx->is_fully_expired()) {
            $purposeoverrides = $purpose->get_purpose_overrides();

            foreach ($expiredctx->get('unexpiredroles') as $roleid) {
                $role = $this->roles[$roleid];
                $override = $purposeoverrides[$roleid];

                $expiries[$role->localname] = get_string('unexpiredrolewithretention', 'tool_dataprivacy', (object) [
                        'retention' => api::format_retention_period(new \DateInterval($override->get('retentionperiod'))),
                    ]);
            }

            foreach ($expiredctx->get('expiredroles') as $roleid) {
                $role = $this->roles[$roleid];
                $override = $purposeoverrides[$roleid];

                $expiries[$role->localname] = get_string('expiredrolewithretention', 'tool_dataprivacy', (object) [
                        'retention' => api::format_retention_period(new \DateInterval($override->get('retentionperiod'))),
                    ]);
            }
        }

        $output = array_map(function($rolename, $expiry) {
            $return = html_writer::tag('dt', $rolename, ['class' => 'col-sm-3']);
            $return .= html_writer::tag('dd', $expiry, ['class' => 'col-sm-9']);

            return $return;
        }, array_keys($expiries), $expiries);

        return html_writer::tag('dl', implode($output), ['class' => 'row']);
    }