code: def _get_value(value):
      if isinstance(value, int):
          if 0 <= value <= 100:
              return value
          else:
              raise StreamlitAPIException(
                  "Progress Value has invalid value [0, 100]: %d"
                  % value
              )
  
      elif isinstance(value, float):
          if 0.0 <= value <= 1.0:
              return int(value * 100)
          else:
              raise StreamlitAPIException(
                  "Progress Value has invalid value [0.0, 1.0]: %f"
                  % value
              )
      else:
          raise StreamlitAPIException(
              "Progress Value has invalid type: %s"
              % type(value).__name__
          )
  
file_path: streamlit/lib/streamlit/elements/progress.py
imports: from typing import TYPE_CHECKING, Optional, Union, cast
  from typing_extensions import TypeAlias
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Progress_pb2 import Progress
  from streamlit.string_util import clean_text
label_desc: Use image node_id 1 for calling a global function with example usage: _get_value(value) and returns: value, int