code: def apply_squashing_func(mu_, pi_, logp_pi):
      """
      Squash the output of the Gaussian distribution
      and account for that in the log probability
      The squashed mean is also returned for using
      deterministic actions.
  
      :param mu_: (tf.Tensor) Mean of the gaussian
      :param pi_: (tf.Tensor) Output of the policy before squashing
      :param logp_pi: (tf.Tensor) Log probability before squashing
      :return: ([tf.Tensor])
      """
      # Squash the output
      deterministic_policy = tf.tanh(mu_)
      policy = tf.tanh(pi_)
      # OpenAI Variation:
      # To avoid evil machine precision error, strictly clip 1-pi**2 to [0,1] range.
      # logp_pi -= tf.reduce_sum(tf.log(clip_but_pass_gradient(1 - policy ** 2, lower=0, upper=1) + EPS), axis=1)
      # Squash correction (from original implementation)
      logp_pi -= tf.reduce_sum(tf.log(1 - policy**2 + EPS), axis=1)
      return deterministic_policy, policy, logp_pi
  
imports: import tensorflow
  import numpy
  from gym.spaces import Box
  from stable_baselines.common.policies import BasePolicy, nature_cnn, register_policy
  from stable_baselines.common.tf_layers import mlp
label_desc: Use image node_id 4 for calling a global function with example usage: apply_squashing_func(mu_, pi_, logp_pi) and returns: deterministic_policy,  policy,  logp_pi