def promote_tf_dtype(tf_dtype):
    if (tf_dtype in [tf.bool, tf.uint8, tf.uint16]):
        return tf.uint32
    if (tf_dtype in [tf.int8, tf.int16]):
        return tf.int32
    if (tf_dtype is tf.float16):
        return tf.float32
    return None
def promote_tf_dtype(tf_dtype):
    if (tf_dtype in [tf.bool, tf.uint8, tf.uint16]):
        return tf.uint32
    if (tf_dtype in [tf.int8, tf.int16]):
        return tf.int32
    if (tf_dtype is tf.float16):
        return tf.float32
    return None