code: def compute_optimal_action(
      observation: np.ndarray, delta: float
  ) -> types.Array:
      batch_size = observation.shape[0]
      optimal_actions = np.zeros(batch_size, dtype=np.int32)
      is_outer = np.int32(
          np.linalg.norm(observation, ord=2, axis=1) > delta
      )
      signs = np.sign(observation)
      optimal_actions += is_outer * [
          _SIGNS_TO_OPT_ACTION[tuple(x)] for x in signs
      ]
      return optimal_actions
  
file_path: agents/tf_agents/bandits/environments/wheel_py_environment.py
imports: from __future__ import absolute_import
  from typing import Optional, Sequence, Text
  import gin
  import numpy
  from tf_agents.bandits.environments import bandit_py_environment
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
label_desc: Use image node_id 1 for calling a global function with example usage: compute_optimal_action(observation, delta) and returns: optimal_actions