code: def make_kernel_bias(
      kernel_shape,
      bias_shape,
      kernel_initializer=None,
      bias_initializer=None,
      kernel_batch_ndims=0,
      bias_batch_ndims=0,
      dtype=tf.float32,
      kernel_name="kernel",
      bias_name="bias",
  ):
      # pylint: disable=line-too-long
      """Creates kernel and bias as `tf.Variable`s.
  
      Args:
        kernel_shape: ...
        bias_shape: ...
        kernel_initializer: ...
          Default value: `None` (i.e., `tf_keras.initializers.glorot_uniform()`).
        bias_initializer: ...
          Default value: `None` (i.e., `tf_keras.initializers.zeros()`).
        kernel_batch_ndims: ...
          Default value: `0`.
        bias_batch_ndims: ...
          Default value: `0`.
        dtype: ...
          Default value: `tf.float32`.
        kernel_name: ...
          Default value: `"kernel"`.
        bias_name: ...
          Default value: `"bias"`.
  
      Returns:
        kernel: ...
        bias: ...
  
      #### Recommendations:
  
      ```python
      #   tf.nn.relu    ==> tf_keras.initializers.he_*
      #   tf.nn.elu     ==> tf_keras.initializers.he_*
      #   tf.nn.selu    ==> tf_keras.initializers.lecun_*
      #   tf.nn.tanh    ==> tf_keras.initializers.glorot_*
      #   tf.nn.sigmoid ==> tf_keras.initializers.glorot_*
      #   tf.nn.softmax ==> tf_keras.initializers.glorot_*
      #   None          ==> tf_keras.initializers.glorot_*
      # https://towardsdatascience.com/hyper-parameters-in-action-part-ii-weight-initializers-35aee1a28404
      # https://stats.stackexchange.com/a/393012/1835
  
      def make_uniform(size):
        s = tf.math.rsqrt(size / 3.)
        return tfd.Uniform(low=-s, high=s)
  
      def make_normal(size):
        # Constant is: `scipy.stats.truncnorm.std(loc=0., scale=1., a=-2., b=2.)`.
        s = tf.math.rsqrt(size) / 0.87962566103423978
        return tfd.TruncatedNormal(loc=0, scale=s, low=-2., high=2.)
  
      # He.  https://arxiv.org/abs/1502.01852
      he_uniform = make_uniform(fan_in / 2.)
      he_normal  = make_normal (fan_in / 2.)
  
      # Glorot (aka Xavier). http://proceedings.mlr.press/v9/glorot10a.html
      glorot_uniform = make_uniform((fan_in + fan_out) / 2.)
      glorot_normal  = make_normal ((fan_in + fan_out) / 2.)
      ```
  
      """
      # pylint: enable=line-too-long
      if kernel_initializer is None:
          kernel_initializer = nn_init_lib.glorot_uniform()
      if bias_initializer is None:
          bias_initializer = tf_keras.initializers.zeros()
      return (
          tf.Variable(
              _try_call_init_fn(
                  kernel_initializer,
                  kernel_shape,
                  dtype,
                  kernel_batch_ndims,
              ),
              name=kernel_name,
          ),
          tf.Variable(
              _try_call_init_fn(
                  bias_initializer, bias_shape, dtype, bias_batch_ndims
              ),
              name=bias_name,
          ),
      )
  
file_path: probability/tensorflow_probability/python/experimental/nn/util/kernel_bias.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors.chain import Chain
  from tensorflow_probability.python.bijectors.shift import Shift
  from tensorflow_probability.python.bijectors.softplus import Softplus
  from tensorflow_probability.python.distributions.categorical import Categorical
  from tensorflow_probability.python.distributions.independent import Independent
  from tensorflow_probability.python.distributions.joint_distribution_sequential import JointDistributionSequential
  from tensorflow_probability.python.distributions.mixture_same_family import MixtureSameFamily
  from tensorflow_probability.python.distributions.normal import Normal
  from tensorflow_probability.python.distributions.sample import Sample
  from tensorflow_probability.python.experimental.nn import initializers
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.util.deferred_tensor import TransformedVariable
label_desc: Use image node_id 1 for calling a global function with example usage: make_kernel_bias(kernel_shape, bias_shape, kernel_initializer, bias_initializer, kernel_batch_ndims, bias_batch_ndims, dtype, kernel_name, bias_name) and returns: tf,  tf