code: def _make_dataset(
      episodes, model, phi, batch_states, obs_normalizer, gamma, lambd
  ):
      """Make a list of transitions with necessary information."""
  
      _add_log_prob_and_value_to_episodes(
          episodes=episodes,
          model=model,
          phi=phi,
          batch_states=batch_states,
          obs_normalizer=obs_normalizer,
      )
  
      _add_advantage_and_value_target_to_episodes(
          episodes, gamma=gamma, lambd=lambd
      )
  
      return list(itertools.chain.from_iterable(episodes))
  
imports: import collections
  import itertools
  import random
  import chainer
  from chainer import cuda
  import chainer.functions
  import numpy
  from chainerrl import agent
  from chainerrl.misc.batch_states import batch_states
label_desc: Use image node_id 11 for calling a global function with example usage: _make_dataset(episodes, model, phi, batch_states, obs_normalizer, gamma, lambd) and returns: list