code: def _get_embed_url(url: str) -> str:
      parsed_url = urllib.parse.urlparse(url)
  
      # Plotly's embed URL is the normal URL plus ".embed".
      # (Note that our use namedtuple._replace is fine because that's not a
      # private method! It just has an underscore to avoid clashing with the
      # tuple field names)
      parsed_embed_url = parsed_url._replace(
          path=parsed_url.path + ".embed"
      )
  
      return urllib.parse.urlunparse(parsed_embed_url)
  
file_path: streamlit/lib/streamlit/elements/plotly_chart.py
imports: import json
  import urllib.parse
  from typing import TYPE_CHECKING, Any, Dict, List, Set, Union, cast
  from typing_extensions import Final, Literal, TypeAlias
  from streamlit import type_util
  from streamlit.errors import StreamlitAPIException
  from streamlit.logger import get_logger
  from streamlit.proto.PlotlyChart_pb2 import PlotlyChart
  from streamlit.runtime.legacy_caching import caching
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 3 for calling a global function with example usage: _get_embed_url(url) and returns: urllib