code: def convert_to_tensor(value, dtype=None):
      # A safer version of `tf.convert_to_tensor` to work around b/149876037.
      # TODO(wangpeng): Remove this function once the bug is fixed.
      if (
          dtype is None
          and isinstance(value, six.integer_types)
          and value >= 2**63
      ):
          dtype = tf.uint64
      elif dtype is None and isinstance(value, float):
          dtype = dtypes.default_float_type()
      return tf.convert_to_tensor(value, dtype=dtype)
  
imports: import numpy
  import six
  import tensorflow.compat.v2
  from trax.tf_numpy.numpy_impl import dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: convert_to_tensor(value, dtype) and returns: tf