code: def prep_data(
      df: pd.DataFrame,
      x_column: str | None,
      y_column_list: List[str],
      color_column: str | None,
      size_column: str | None,
  ) -> Tuple[
      pd.DataFrame, str | None, str | None, str | None, str | None
  ]:
      """Prepares the data for charting. This is also used in add_rows.
  
      Returns the prepared dataframe and the new names of the x column (taking the index reset into
      consideration) and y, color, and size columns.
      """
  
      # If y is provided, but x is not, we'll use the index as x.
      # So we need to pull the index into its own column.
      x_column = _maybe_reset_index_in_place(
          df, x_column, y_column_list
      )
  
      # Drop columns we're not using.
      selected_data = _drop_unused_columns(
          df, x_column, color_column, size_column, *y_column_list
      )
  
      # Maybe convert color to Vega colors.
      _maybe_convert_color_column_in_place(selected_data, color_column)
  
      # Make sure all columns have string names.
      (
          x_column,
          y_column_list,
          color_column,
          size_column,
      ) = _convert_col_names_to_str_in_place(
          selected_data,
          x_column,
          y_column_list,
          color_column,
          size_column,
      )
  
      # Maybe melt data from wide format into long format.
      melted_data, y_column, color_column = _maybe_melt(
          selected_data,
          x_column,
          y_column_list,
          color_column,
          size_column,
      )
  
      # Return the data, but also the new names to use for x, y, and color.
      return melted_data, x_column, y_column, color_column, size_column
  
imports: from __future__ import annotations
  from contextlib import nullcontext
  from datetime import date
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Collection, Dict, List, Sequence, Tuple, cast
  import pandas
  from pandas.api.types import infer_dtype, is_integer_dtype
  from typing_extensions import Literal
  import streamlit.elements.arrow_vega_lite
  from streamlit import type_util
  from streamlit.color_util import Color, is_color_like, is_color_tuple_like, is_hex_color_like, to_css_color
  from streamlit.elements.altair_utils import AddRowsMetadata
  from streamlit.elements.arrow import Data
  from streamlit.elements.utils import last_index_for_melted_dataframes
  from streamlit.errors import Error, StreamlitAPIException
  from streamlit.proto.ArrowVegaLiteChart_pb2 import ArrowVegaLiteChart
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 3 for calling a global function with example usage: prep_data(df, x_column, y_column_list, color_column, size_column) and returns: melted_data,  x_column,  y_column,  color_column,  size_column