code: def _run_optimal_deep_sea_episode(
      environment: deep_sea.DeepSea, recorder: DemonstrationRecorder
  ):
      timestep = environment.reset()
      while timestep.step_type is not dm_env.StepType.LAST:
          action = _optimal_deep_sea_policy(environment, timestep)
          recorder.step(timestep, action)
          timestep = environment.step(action)
      recorder.step(timestep, np.zeros_like(action))
  
imports: from typing import Any, List
  from absl import flags
  from bsuite.environments import deep_sea
  import dm_env
  import numpy
  import tensorflow
  import tree
label_desc: Use image node_id 3 for calling a global function with example usage: _run_optimal_deep_sea_episode(environment, recorder) without return types