code: def kahan_summation(
      accumulator: types.Float, carry: types.Float, value: types.Float
  ) -> Tuple[types.Float, types.Float]:
      """Calculate stable acculated sum using compensation for low-bits.
  
      For more details:
      https://en.wikipedia.org/wiki/Kahan_summation_algorithm
  
  
      Args:
        accumulator: Accumulator.
        carry: Carry for lost low-order bits.
        value: New value to accumlate.
  
      Returns:
        A tuple `(accumulator, carry)` such that `accumulator` is the new
        accumulated value and `carry` is the new compensation value.
      """
      delta = value - carry
      new_accumulator = accumulator + delta
      carry = (new_accumulator - accumulator) - delta
      return new_accumulator, carry
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Tuple
  import six
  import tensorflow
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 2 for calling a global function with example usage: kahan_summation(accumulator, carry, value) and returns: new_accumulator,  carry