code: def tanh_and_scale_to_spec(inputs, spec):
      """Maps inputs with arbitrary range to range defined by spec using `tanh`."""
      means = (spec.maximum + spec.minimum) / 2.0
      magnitudes = (spec.maximum - spec.minimum) / 2.0
  
      return means + magnitudes * tf.tanh(inputs)
  
file_path: agents/tf_agents/agents/ppo/ppo_actor_network.py
imports: import functools
  import sys
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  from tf_agents.keras_layers import bias_layer
  from tf_agents.networks import nest_map
  from tf_agents.networks import sequential
label_desc: Use image node_id 1 for calling a global function with example usage: tanh_and_scale_to_spec(inputs, spec) and returns: unknown