code: def stddev(x, sample_axis=0, keepdims=False, name=None):
      """Estimate standard deviation using samples.
  
      Given `N` samples of scalar valued random variable `X`, standard deviation may
      be estimated as
  
      ```none
      Stddev[X] := Sqrt[Var[X]],
      Var[X] := N^{-1} sum_{n=1}^N (X_n - Xbar) Conj{(X_n - Xbar)},
      Xbar := N^{-1} sum_{n=1}^N X_n
      ```
  
      ```python
      x = tf.random.normal(shape=(100, 2, 3))
  
      # stddev[i, j] is the sample standard deviation of the (i, j) batch member.
      stddev = tfp.stats.stddev(x, sample_axis=0)
      ```
  
      Scaling a unit normal by a standard deviation produces normal samples
      with that standard deviation.
  
      ```python
      observed_data = read_data_samples(...)
      stddev = tfp.stats.stddev(observed_data)
  
      # Make fake_data with the same standard deviation as observed_data.
      fake_data = stddev * tf.random.normal(shape=(100,))
      ```
  
      Notice we divide by `N` (the numpy default), which does not create `NaN`
      when `N = 1`, but is slightly biased.
  
      Args:
        x:  A numeric `Tensor` holding samples.
        sample_axis: Scalar or vector `Tensor` designating axis holding samples, or
          `None` (meaning all axis hold samples).
          Default value: `0` (leftmost dimension).
        keepdims:  Boolean.  Whether to keep the sample axis as singletons.
        name: Python `str` name prefixed to Ops created by this function.
              Default value: `None` (i.e., `'stddev'`).
  
      Returns:
        stddev: A `Tensor` of same `dtype` as the `x`, and rank equal to
          `rank(x) - len(sample_axis)`
      """
      with tf.name_scope(name or "stddev"):
          return tf.sqrt(
              variance(x, sample_axis=sample_axis, keepdims=keepdims)
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math.generic import reduce_logmeanexp
label_desc: Use image node_id 5 for calling a global function with example usage: stddev(x, sample_axis, keepdims, name) and returns: tf