code: def split_states_for_pmap(
      state: Union[TaskState, PolicyState]
  ) -> Union[TaskState, PolicyState]:
      return tree_map(split_params_for_pmap, state)
  
imports: import logging
  from functools import partial
  from typing import Tuple
  from typing import Union
  import time
  import jax
  import jax.numpy
  from jax import random
  from jax.tree_util import tree_map
  from evojax.obs_norm import ObsNormalizer
  from evojax.task.base import TaskState
  from evojax.task.base import VectorizedTask
  from evojax.policy.base import PolicyState
  from evojax.policy.base import PolicyNetwork
  from evojax.util import create_logger
label_desc: Use image node_id 3 for calling a global function with example usage: split_states_for_pmap(state) and returns: tree_map