code: def _cast_to_pod(val):
    
    bools = {"True": True, "False": False}
    if val in bools:
      return bools[val]
    try:
      return int(val)
    except ValueError:
      try:
        return float(val)
      except ValueError:
        return tf.compat.as_text(val)
docs: Try cast to int, float, bool, str, in that order.