class_docstr: Beta distribution, for bounded continuous actions (specification key: `beta`).
  
  Args:
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      action_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      input_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
code: def sample(self, *, parameters, temperature, independent):
      alpha, beta, alpha_beta, log_norm = parameters.get(
          ("alpha", "beta", "alpha_beta", "log_norm")
      )
  
      # Distribution parameter summaries
      dependencies = list()
      if not independent:
  
          def fn_summary():
              a = tf.math.reduce_mean(
                  input_tensor=alpha,
                  axis=range(self.action_spec.rank + 1),
              )
              b = tf.math.reduce_mean(
                  input_tensor=beta,
                  axis=range(self.action_spec.rank + 1),
              )
              return a, b
  
          prefix = "distributions/" + self.name
          names = (prefix + "-alpha", prefix + "-beta")
          dependencies.extend(
              self.summary(
                  label="distribution",
                  name=names,
                  data=fn_summary,
                  step="timesteps",
              )
          )
  
      # Distribution parameter tracking
      def fn_tracking():
          return tf.math.reduce_mean(input_tensor=alpha, axis=0)
  
      dependencies.extend(
          self.track(
              label="distribution", name="alpha", data=fn_tracking
          )
      )
  
      def fn_tracking():
          return tf.math.reduce_mean(input_tensor=beta, axis=0)
  
      dependencies.extend(
          self.track(
              label="distribution", name="beta", data=fn_tracking
          )
      )
  
      epsilon = tf_util.constant(value=util.epsilon, dtype="float")
  
      def fn_mode():
          # Deterministic: mean as action
          return beta / alpha_beta
  
      def fn_sample():
          # Non-deterministic: sample action using gamma distribution
          alpha_sample = tf.random.gamma(
              shape=(),
              alpha=alpha,
              dtype=tf_util.get_dtype(type="float"),
          )
          beta_sample = tf.random.gamma(
              shape=(),
              alpha=beta,
              dtype=tf_util.get_dtype(type="float"),
          )
          return beta_sample / (alpha_sample + beta_sample)
  
      action = tf.cond(
          pred=(temperature < epsilon),
          true_fn=fn_mode,
          false_fn=fn_sample,
      )
  
      min_value = tf_util.constant(
          value=self.action_spec.min_value, dtype="float"
      )
      max_value = tf_util.constant(
          value=self.action_spec.max_value, dtype="float"
      )
  
      with tf.control_dependencies(control_inputs=dependencies):
          return min_value + (max_value - min_value) * action
  
file_path: tensorforce/tensorforce/core/distributions/beta.py
imports: import numpy
  import tensorflow
  from tensorforce import TensorforceError, util
  from tensorforce.core import layer_modules, TensorDict, TensorSpec, TensorsSpec, tf_function, tf_util
  from tensorforce.core.distributions import Distribution
label_desc: Use image node_id 6 for calling the Beta obj's underlying member method code with example usage: obj.sample() and returns: tf, tf, unknown, unknown, unknown, a,  b