def METHOD_NAME(self) -> Dict[str, Dict[str, Union[dict, str]]]:
    logging.info('Retrieving task data from Mephisto.')
    task_units_data = self.get_task_data()
    logging.info(f'Data for {len(task_units_data)} units loaded successfully.')
    results = dict()
    for work_unit in task_units_data:
        assignment_id = work_unit['assignment_id']
        data = work_unit['data']
        agent_name = data['agent_name']
        if agent_name == 'Wizard':
            # Only collecting Wizard side data. Because it contains
            # data that is needed from the apprentice side too.
            formatted_chat_data = self.format_chat_data(data['messages'])
            results[assignment_id] = formatted_chat_data
    logging.info(f'{len(results)} dialogues compiled.')
    return results