code: def round_gls(gls, precision=None):
      """Returns genotype likelihoods rounded to the desired precision level.
  
      Args:
        gls: A list of floats. The input genotype likelihoods at any precision.
        precision: Positive int. The number of places past the decimal point to
          round to. If None, no rounding is performed.
  
      Returns:
        A list of floats rounded to the desired precision.
  
      Raises:
        ValueError: The input gls do not sum to nearly 1.
      """
      if abs(sum(gls) - 1) > 1e-6:
          raise ValueError(
              "Invalid genotype likelihoods do not sum to one: sum({}) = {}".format(
                  gls, sum(gls)
              )
          )
      if precision is None:
          return gls
  
      min_ix = 0
      min_gl = gls[0]
      for ix, gl in enumerate(gls):
          if gl < min_gl:
              min_gl = gl
              min_ix = ix
  
      rounded_gls = [round(gl, precision) for gl in gls]
      rounded_gls[min_ix] = max(
          0.0,
          round(
              1 - sum(rounded_gls[:min_ix] + rounded_gls[min_ix + 1 :]),
              precision,
          ),
      )
      return rounded_gls
  
imports: import multiprocessing
  import os
  import time
  from typing import Any
  from absl import flags
  from absl import logging
  import numpy
  import tensorflow
  from deepvariant import dv_utils
  from deepvariant import keras_modeling
  from deepvariant import logging_level
  from deepvariant.protos import deepvariant_pb2
  from absl import app
  import multiprocessing
  from third_party.nucleus.io import sharded_file_utils
  from third_party.nucleus.io import tfrecord
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import errors
  from third_party.nucleus.util import proto_utils
  from third_party.nucleus.util import variant_utils
label_desc: Use image node_id 1 for calling a global function with example usage: round_gls(gls, precision) and returns: rounded_gls, gls