public static function get_individual_conversations_between_users(array $useridsets) : array {
        global $DB;

        if (empty($useridsets)) {
            return [];
        }

        $hashes = array_map(function($userids) {
            return  helper::get_conversation_hash($userids);
        }, $useridsets);

        list($inorequalsql, $params) = $DB->get_in_or_equal($hashes);
        array_unshift($params, self::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL);
        $where = "type = ? AND convhash ${inorequalsql}";
        $conversations = array_fill(0, count($hashes), null);
        $records = $DB->get_records_select('message_conversations', $where, $params);

        foreach (array_values($records) as $record) {
            $index = array_search($record->convhash, $hashes);
            if ($index !== false) {
                $conversations[$index] = $record;
            }
        }

        return $conversations;
    }