def create_adapter(trainer):
    """ Creates an adapter (for the learner)
        :param trainer: A reinforcement learning trainer instance.
        :type trainer: diplomacy_research.models.training.reinforcement.trainer.ReinforcementTrainer
    """
    from diplomacy_research.utils.tensorflow import tf
    trainer.adapter = trainer.adapter_constructor(trainer.queue_dataset,
        graph=tf.get_default_graph())
