code: def _stdtrit_series_expansion(df, p, numpy_dtype):
      """Compute `stdtrit(df, p)` using series expansion."""
      # This function provides a fast approximation of stdtrit(df, p) for df >= 1.
      # It is based on an asymptotic inverse expansion of Cornish-Fisher type about
      # normal deviates. But for small p, where t**2 / df is large, a second series
      # expansion is used to achieve sufficient accuracy. Both approximations were
      # proposed in [4].
      # We assume here that condition (p <= 0.5) is always true.
      half, one, two, three, four, five, six, seven = [
          numpy_dtype(n) for n in (0.5,) + tuple(range(1, 8))
      ]
  
      a = tf.math.reciprocal(df - half)
      b = numpy_dtype(48.0) / tf.math.square(a)
      c = numpy_dtype(96.36) + a * (
          (numpy_dtype(20700.0) * a / b - numpy_dtype(98.0)) * a
          - numpy_dtype(16.0)
      )
      d = (
          df
          * tf.math.sqrt(a * half * numpy_dtype(np.pi))
          * ((numpy_dtype(94.5) / (b + c) - three) / b + one)
      )
  
      # First series expansion: asymptotic inverse expansion about normal deviates.
      z = tf.math.ndtri(p)
      squared_z = tf.math.square(z)
      c = (
          b
          + c
          + z
          * (((numpy_dtype(0.05) * d * z - five) * z - seven) * z - two)
      )
      c_correction = (
          numpy_dtype(0.3)
          * (df - numpy_dtype(4.5))
          * (z + numpy_dtype(0.6))
      )
      c = tf.where(df >= 5.0, c, c + c_correction)
  
      squared_t_over_df = numpy_dtype(0.4) * squared_z + numpy_dtype(
          6.3
      )
      squared_t_over_df = squared_t_over_df * squared_z + numpy_dtype(
          36.0
      )
      squared_t_over_df = squared_t_over_df * squared_z + numpy_dtype(
          94.5
      )
      squared_t_over_df = z * (
          (squared_t_over_df / c - squared_z - three) / b + one
      )
      squared_t_over_df = tf.math.expm1(
          a * tf.math.square(squared_t_over_df)
      )
  
      # Second series expansion.
      y = tf.math.exp(
          two
          / df
          * (tf.math.log(d) + tf.math.log(two) + tf.math.log(p))
      )
  
      df_plus_2 = df + two
      large_squared_t_over_df = (df + six) / (df * y) - numpy_dtype(
          0.089
      ) * d
      large_squared_t_over_df = (
          df_plus_2
          * three
          * (large_squared_t_over_df - numpy_dtype(0.822))
      )
      large_squared_t_over_df = large_squared_t_over_df + half / (
          df + four
      )
      large_squared_t_over_df = y / large_squared_t_over_df - one
      large_squared_t_over_df = tf.math.reciprocal(
          y
      ) + large_squared_t_over_df * ((df + one) / df_plus_2)
  
      p_is_not_small = y >= (numpy_dtype(0.05) + a)
      # The condition to use the first series expansion was improved in [6].
      use_first_series_expansion = p_is_not_small | (
          (df < 2.1) & (p > 0.25)
      )
      squared_t_over_df = tf.where(
          use_first_series_expansion,
          squared_t_over_df,
          large_squared_t_over_df,
      )
  
      return -tf.math.sqrt(df * squared_t_over_df)
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import special_math
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import generic
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math import numeric
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 14 for calling a global function with example usage: _stdtrit_series_expansion(df, p, numpy_dtype) and returns: unknown