code: def _parse_y_columns(
      df: pd.DataFrame,
      y_from_user: str | Sequence[str] | None,
      x_column: str | None,
  ) -> List[str]:
      y_column_list: List[str] = []
  
      if y_from_user is None:
          y_column_list = list(df.columns)
  
      elif isinstance(y_from_user, str):
          y_column_list = [y_from_user]
  
      elif type_util.is_sequence(y_from_user):
          y_column_list = list(str(col) for col in y_from_user)
  
      else:
          raise StreamlitAPIException(
              "y parameter should be a column name (str) or list thereof. "
              f"Value given: {y_from_user} (type {type(y_from_user)})"
          )
  
      for col in y_column_list:
          if col not in df.columns:
              raise StreamlitColumnNotFoundError(df, col)
  
      # y_column_list should only include x_column when user explicitly asked for it.
      if x_column in y_column_list and (
          not y_from_user or x_column not in y_from_user
      ):
          y_column_list.remove(x_column)
  
      return y_column_list
  
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 11 for calling a global function with example usage: _parse_y_columns(df, y_from_user, x_column) and returns: y_column_list