class_docstr: Cox–Ingersoll–Ross model.
  
  Represents the Ito process:
  
  ```None
    dX_i(t) = (a - k*X_i(t)) * dt +  sigma * sqrt(X_i(t)) * dW_i(t)
  ```
  where
    a / k: Corresponds to the long term mean.
    k: Corresponds to the speed of reversion.
    sigma: Corresponds to the instantaneous volatility.
  
  See [1] for details.
  
  #### References:
    [1]: A. Alfonsi. Affine Diffusions and Related Processes: Simulation,
      Theory and Applications
class_docstr_tok: ["Cox\u2013Ingersoll\u2013Ross","model",".","Represents","the","Ito","process",":","``","`","None","dX_i","(","t",")","=","(","a","-","k","*","X_i","(","t",")",")","*","dt","+","sigma","*","sqrt","(","X_i","(","t",")",")","*","dW_i","(","t",")","``","`","where","a","\/","k",":","Corresponds","to","the","long","term","mean",".","k",":","Corresponds","to","the","speed","of","reversion",".","sigma",":","Corresponds","to","the","instantaneous","volatility",".","See","[","1","]","for","details",".","#","#","#","#","References",":","[","1","]",":","A.","Alfonsi",".","Affine","Diffusions","and","Related","Processes",":","Simulation",",","Theory","and","Applications"]
docstr: Returns the distribution depending on the `random_type`.
  
  Args:
    random_type: `STATELESS` or `PSEUDO` type from `RandomType` Enum.
  
  Returns:
   Tuple (Poisson distribution, Gamma distribution, function to generate
   seed for Poisson distribution, function to generate seed for Gamma
   distribution).
docstr_tok: ["Returns","the","distribution","depending","on","the","`","random_type","`",".","Args",":","random_type",":","`","STATELESS","`","or","`","PSEUDO","`","type","from","`","RandomType","`","Enum",".","Returns",":","Tuple","(","Poisson","distribution",",","Gamma","distribution",",","function","to","generate","seed","for","Poisson","distribution",",","function","to","generate","seed","for","Gamma","distribution",")","."]
code: def _get_distributions(random_type):
      """Returns the distribution depending on the `random_type`.
  
      Args:
        random_type: `STATELESS` or `PSEUDO` type from `RandomType` Enum.
  
      Returns:
       Tuple (Poisson distribution, Gamma distribution, function to generate
       seed for Poisson distribution, function to generate seed for Gamma
       distribution).
      """
      if random_type == random.RandomType.STATELESS:
          poisson_seed_fn = lambda seed, i: tf.stack(
              [seed[0], seed[1] + i]
          )
          gamma_seed_fn = lambda seed, i: tf.stack(
              [seed[0] + 1, seed[1] + i]
          )
          return (
              tf.random.stateless_poisson,
              tf.random.stateless_gamma,
              poisson_seed_fn,
              gamma_seed_fn,
          )
      elif random_type == random.RandomType.PSEUDO:
          seed_fn = lambda seed, _: seed
          return tf.random.poisson, tf.random.gamma, seed_fn, seed_fn
      else:
          raise ValueError(
              "Only STATELESS and PSEUDO random types are supported."
          )
  
file_path: tf-quant-finance/tf_quant_finance/models/cir/cir_model.py
imports: from typing import Optional
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.math import random_ops
  from tf_quant_finance.models import generic_ito_process
label_desc: Use image node_id 5 for calling the CirModel obj's underlying member method code with example usage: obj._get_distributions(random_type) and returns: tf,  tf,  poisson_seed_fn,  gamma_seed_fn, tf,  tf,  seed_fn,  seed_fn