code: def gamma(
      shape, alpha, beta=None, dtype=np.float32, seed=None, name=None
  ):
      """Handles the difference in shape parameter interpretation."""
      # While we still have usages of tf.random.gamma and tf.random.stateless_gamma,
      # we must handle the different interpretation of the shape argument
      # between the two. `tf.random.gamma` interprets shape as a prefix.
      # `tf.random.stateless_gamma` interprets shape as the full output shape,
      # including as suffix the broadcast of alpha and beta shapes.
      scale = 1 if beta is None else beta
      shape = _ensure_shape_tuple(shape) + _bcast_shape(
          (), [alpha, scale]
      )
      return stateless_gamma(
          shape=shape,
          alpha=alpha,
          beta=beta,
          dtype=dtype,
          seed=seed,
          name=name,
      )
  
imports: import numpy
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.numpy_math import softmax
label_desc: Use image node_id 18 for calling a global function with example usage: gamma(shape, alpha, beta, dtype, seed, name) and returns: stateless_gamma