code: def _collect_first_recurrent_states_of_vf(episodes):
      return [
          (
              ep[0]["recurrent_state"][1]
              if ep[0]["recurrent_state"] is not None
              else None
          )
          for ep in episodes
      ]
  
imports: import collections
  import random
  from logging import getLogger
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
  import pfrl
  from pfrl import agent
  from pfrl.agents.ppo import _compute_explained_variance, _make_dataset, _make_dataset_recurrent, _yield_minibatches, _yield_subset_of_sequences_with_fixed_number_of_items
  from pfrl.utils import clip_l2_grad_norm_
  from pfrl.utils.batch_states import batch_states
  from pfrl.utils.mode_of_distribution import mode_of_distribution
  from pfrl.utils.recurrent import concatenate_recurrent_states, flatten_sequences_time_first, get_recurrent_state_at, mask_recurrent_state_at, one_step_forward, pack_and_forward
label_desc: Use image node_id 8 for calling a global function with example usage: _collect_first_recurrent_states_of_vf(episodes) and returns: unknown