public function get_group(event_interface $event) {
        if (is_null($this->groups)) {
            $this->load_groups();
        }

        if ($group = $event->get_group()) {
            $groupid = $group->get('id');
            return isset($this->groups[$groupid]) ? $this->groups[$groupid] : null;
        } else {
            return null;
        }
    }