def get_batch(self, key, indexes):
        '''{LanguageProcessingBase.GET_BATCH_DOC_WITHOUT_RETURNS}

        Returns:
            (dict): A dict at least contains:
            {MultiTurnDialog.GET_BATCH_RETURNS_DICT}

            See the example belows.

        Examples:
            {MultiTurnDialog.GET_BATCH_EXAMPLES_PART}
            }
        '''
        if key not in self.key_name:
            raise ValueError("No set named %s." % key)
        batch_size = len(indexes)
        res = {}

        res['context_length'] = [len(self.data[key]['posts'][idx]) for idx in indexes]
        max_context_length = max(res['context_length'])
        res['posts_length'] = np.zeros((batch_size * max_context_length), dtype=int)
        for i, idx in enumerate(indexes):
            posts_length = [len(each) for each in self.data[key]['posts'][idx]]
            res['posts_length'][i * max_context_length: i * max_context_length + len(posts_length)] = posts_length

        max_posts_length = np.max(res['posts_length'])
        res['posts'] = np.zeros((batch_size * max_context_length, max_posts_length), dtype=int)
        for i, idx in enumerate(indexes):
            for j in range(res['context_length'][i]):
                post = self.data[key]['posts'][idx][j]
                res['posts'][i * max_context_length + j, :len(post)] = post

        res['prev_posts_length'] = [len(self.data[key]['posts'][idx][-1]) for idx in indexes]
        max_prev_posts_length = max(res['prev_posts_length'])
        res['prev_posts'] = np.zeros((batch_size, max_prev_posts_length), dtype=int)
        for i, idx in enumerate(indexes):
            prev_post = self.data[key]['posts'][idx][-1]
            res['prev_posts'][i, :len(prev_post)] = prev_post

        res['responses_length'] = [len(self.data[key]['responses'][idx]) for idx in indexes]
        max_responses_length = max(res['responses_length'])
        res['responses'] = np.zeros((batch_size, max_responses_length), dtype=int)
        for i, idx in enumerate(indexes):
            response = self.data[key]['responses'][idx]
            res['responses'][i, :len(response)] = response

        res['responses_allvocabs'] = res['responses'].copy()

        res['posts'][res['posts'] >= self.valid_vocab_len] = self.unk_id
        res['prev_posts'][res['prev_posts'] >= self.valid_vocab_len] = self.unk_id
        res['responses'][res['responses'] >= self.valid_vocab_len] = self.unk_id

        max_kg_num = max([len(self.data[key]['kg'][idx]) for idx in indexes])
        res["kg_h_length"] = np.zeros((batch_size, max_kg_num), dtype=int)
        res["kg_hr_length"] = np.zeros((batch_size, max_kg_num), dtype=int)
        res['kg_hrt_length'] = np.zeros((batch_size, max_kg_num), dtype=int)
        for i, idx in enumerate(indexes):
            kg_h_length = [min(self._max_know_length, len(sent[0]))
                           for sent in self.data[key]['kg'][idx]]
            res["kg_h_length"][i, :len(kg_h_length)] = kg_h_length
            kg_hr_length = [min(self._max_know_length, len(sent[0]) + len(sent[1]))
                            for sent in self.data[key]['kg'][idx]]
            res["kg_hr_length"][i, :len(kg_hr_length)] = kg_hr_length
            kg_hrt_length = [min(self._max_know_length, len(sent[0]) + len(sent[1]) + len(sent[2]))
                             for sent in self.data[key]['kg'][idx]]
            res["kg_hrt_length"][i, :len(kg_hrt_length)] = kg_hrt_length


        res['kg'] = np.zeros((batch_size, max_kg_num, np.max(res["kg_hrt_length"])), dtype=int)
        for i, idx in enumerate(indexes):
            for j, tri in enumerate(self.data[key]['kg'][idx]):
                sent = (tri[0] + tri[1] + tri[2])[:self._max_know_length]
                res['kg'][i, j, :len(sent)] = sent

        res['kg_index'] = np.zeros((batch_size, max_kg_num), dtype=float)
        for i, idx in enumerate(indexes):
            for kgid in self.data[key]['kg_index'][idx]:
                res['kg_index'][i, kgid] = 1

        return res
{LanguageProcessingBase.GET_BATCH_DOC_WITHOUT_RETURNS}

        Returns:
            (dict): A dict at least contains:
            {MultiTurnDialog.GET_BATCH_RETURNS_DICT}

            See the example belows.

        Examples:
            {MultiTurnDialog.GET_BATCH_EXAMPLES_PART}
            }
        
benchmark/myCoTK/dataloader/multi_turn_dialog.py