code: def cauchy_1d(sigma, truncated=5.0):
      if sigma <= 0:
          return tf.constant(0.0)
  
      tail = int(sigma * truncated + 0.5)
      k = [
          ((float(x) / sigma) ** 2 + 1.0)
          for x in range(-tail, tail + 1)
      ]
      k = tf.reciprocal(k)
      k = k / tf.reduce_sum(k)
      return k
  
file_path: NiftyNet/niftynet/layer/approximated_smoothing.py
imports: from __future__ import absolute_import, print_function, division
  import tensorflow
  from niftynet.layer.base_layer import Layer
  from niftynet.layer.layer_util import expand_spatial_params, infer_spatial_rank
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 2 for calling a global function with example usage: cauchy_1d(sigma, truncated) and returns: k, tf