code: def scale_to_gaussian(
      x: common_types.ConsistentTensorType,
      elementwise: bool = False,
      name: Optional[str] = None,
      output_dtype: Optional[tf.DType] = None,
  ) -> common_types.ConsistentTensorType:
      """Returns an (approximately) normal column with mean to 0 and variance 1.
  
      We transform the column to values that are approximately distributed
      according to a standard normal distribution.
      The transformation is obtained by applying the moments method to estimate
      the parameters of a Tukey HH distribution and applying the inverse of the
      estimated function to the column values.
      The method is partially described in
  
      Georg M. Georgm "The Lambert Way to Gaussianize Heavy-Tailed Data with the
      Inverse of Tukey's h Transformation as a Special Case," The Scientific World
      Journal, Vol. 2015, Hindawi Publishing Corporation.
  
      We use the L-moments instead of conventional moments to be able to deal with
      long-tailed distributions. The expressions of the L-moments for the Tukey HH
      distribution is in
  
      Todd C. Headrick, and Mohan D. Pant. "Characterizing Tukey H and
      HH-Distributions through L-Moments and the L-Correlation," ISRN Applied
      Mathematics, vol. 2012, 2012. doi:10.5402/2012/980153
  
      Note that the transformation to Gaussian is applied only if the column has
      long-tails. If this is not the case, for instance if values are uniformly
      distributed, the values are only normalized using the z score. This applies
      also to the cases where only one of the tails is long; the other tail is only
      rescaled but not non linearly transformed.
      Also, if the analysis set is empty, the transformation is set to to leave the
      input vaules unchanged.
  
      Args:
        x: A numeric `Tensor`, `SparseTensor`, or `RaggedTensor`.
        elementwise: If true, scales each element of the tensor independently;
          otherwise uses the parameters of the whole tensor.
        name: (Optional) A name for this operation.
        output_dtype: (Optional) If not None, casts the output tensor to this type.
  
      Returns:
        A `Tensor`, `SparseTensor`, or `RaggedTensor` containing the input column
        transformed to be approximately standard distributed (i.e. a Gaussian with
        mean 0 and variance 1). If `x` is floating point, the mean will have the
        same type as `x`. If `x` is integral, the output is cast to tf.float32.
  
        Note that TFLearn generally permits only tf.int64 and tf.float32, so casting
        this scaler's output may be necessary.
      """
      with tf.compat.v1.name_scope(name, "scale_to_gaussian"):
          return _scale_to_gaussian_internal(
              x=x, elementwise=elementwise, output_dtype=output_dtype
          )
  
imports: import os
  from typing import Any, Callable, Iterable, Optional, Tuple, Union
  import tensorflow
  from tensorflow_transform import analyzers
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import gaussianization
  from tensorflow_transform import schema_inference
  from tensorflow_transform import tf_utils
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 1 for calling a global function with example usage: scale_to_gaussian(x, elementwise, name, output_dtype) and returns: _scale_to_gaussian_internal