code: def string_to_int_tensor(x):
      """Graph operations decode a string into a fixed-size tensor of ints."""
      decoded = tf.compat.v1.decode_raw(x, tf.uint8)
      clipped = decoded[
          :STRING_TO_INT_MAX_CONTENTS_LEN
      ]  # clip to allowed max_len
      shape = tf.shape(input=clipped)
      slen = shape[0]
      # pad to desired max_len
      padded = tf.pad(
          tensor=clipped,
          paddings=[[0, STRING_TO_INT_MAX_CONTENTS_LEN - slen]],
      )
      casted = tf.cast(padded, tf.int32)
      casted.set_shape([STRING_TO_INT_MAX_CONTENTS_LEN])
      return tf.concat([[slen], casted], 0)
  
imports: import json
  from typing import Optional
  from absl import logging
  import numpy
  import tensorflow
  from deepvariant.protos import deepvariant_pb2
  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 tensorflow.core.example import example_pb2
label_desc: Use image node_id 20 for calling a global function with example usage: string_to_int_tensor(x) and returns: tf