code: def _offset_indexes_to_offset(
      offset_indexes, num_noise_levels, dtype
  ):
      return tf.cast(
          (offset_indexes + 1) / (num_noise_levels + 1) - 0.5,
          dtype=dtype,
      )
  
imports: import functools
  import tensorflow
  from tensorflow_compression.python.entropy_models import continuous_base
  from tensorflow_compression.python.ops import gen_ops
  from tensorflow_compression.python.ops import math_ops
label_desc: Use image node_id 2 for calling a global function with example usage: _offset_indexes_to_offset(offset_indexes, num_noise_levels, dtype) and returns: tf