code: def _permutohedral_gen(permutohedral, data_vectors, name):
      """
      a wrapper combines permutohedral_compute and a customised gradient op.
  
      :param permutohedral:
      :param data_vectors:
      :param name:
      :return:
      """
      (
          barycentric,
          blur_neighbours1,
          blur_neighbours2,
          indices,
      ) = permutohedral
      backward_branch = _gradient_stub(
          data_vectors,
          barycentric,
          blur_neighbours1,
          blur_neighbours2,
          indices,
          name,
      )
      forward_branch = permutohedral_compute(
          data_vectors,
          barycentric,
          blur_neighbours1,
          blur_neighbours2,
          indices,
          name,
          reverse=False,
      )
      return backward_branch + tf.stop_gradient(forward_branch)
  
file_path: NiftyNet/niftynet/layer/crf.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.layer_util import infer_spatial_rank, expand_spatial_params
label_desc: Use image node_id 6 for calling a global function with example usage: _permutohedral_gen(permutohedral, data_vectors, name) and returns: unknown