class_docstr: Use the transformed GP to give the *scale* (inverse rate) of the Gamma
class_docstr_tok: ["Use","the","transformed","GP","to","give","the","*","scale","*","(","inverse","rate",")","of","the","Gamma"]
code: def __init__(
      self,
      invlink: Callable[[tf.Tensor], tf.Tensor] = tf.exp,
      shape: ConstantOrFunction = 1.0,
      shape_lower_bound: Optional[float] = None,
      **kwargs: Any,
  ) -> None:
      super().__init__(**kwargs)
      self.invlink = invlink
      self.shape_lower_bound = _lower_bound(shape_lower_bound)
      self.shape = prepare_parameter_or_function(
          shape, lower_bound=self.shape_lower_bound
      )
  
imports: from math import sqrt
  from typing import Any, Callable, Optional
  import numpy
  import tensorflow
  from check_shapes import check_shapes, inherit_check_shapes
  from ..None import logdensities
  from ..base import MeanAndVariance, TensorType
  from ..config import default_likelihood_positive_minimum
  from ..utilities.parameter_or_function import ConstantOrFunction, ParameterOrFunction, evaluate_parameter_or_function, prepare_parameter_or_function
  from .base import ScalarLikelihood
  from .utils import inv_probit
label_desc: Use image node_id 1 to create a new Gamma object from inherited base classes: ScalarLikelihood with example: obj = Gamma(invlink, shape, shape_lower_bound)