code: def _parse_delta(delta: Delta) -> str:
      if delta is None or delta == "":
          return ""
      if isinstance(delta, str):
          return dedent(delta)
      elif isinstance(delta, int) or isinstance(delta, float):
          return str(delta)
      else:
          raise TypeError(
              f"'{str(delta)}' is of type {str(type(delta))}, which is not an accepted type."
              " delta only accepts: int, float, str, or None."
              " Please convert the value to an accepted type."
          )
  
file_path: streamlit/lib/streamlit/elements/metric.py
imports: from dataclasses import dataclass
  from textwrap import dedent
  from typing import TYPE_CHECKING, Optional, Union, cast
  from typing_extensions import Literal, TypeAlias
  from streamlit.elements.utils import get_label_visibility_proto_value
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Metric_pb2 import Metric
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.string_util import clean_text
  from streamlit.type_util import LabelVisibility, maybe_raise_label_warnings
label_desc: Use image node_id 3 for calling a global function with example usage: _parse_delta(delta) and returns: str, dedent, str