code: def merge_dataframes(df: pd.DataFrame) -> pd.DataFrame:
      """Join dataframes for procedures such as splitting data, set auto seasonalities, and others.
  
      Parameters
      ----------
          df : pd.DataFrame
              containing column ``ds``, ``y``, and ``ID`` with data
  
      Returns
      -------
          pd.Dataframe
              Dataframe with concatenated time series (sorted 'ds', duplicates removed, index reset)
      """
      if not isinstance(df, pd.DataFrame):
          raise ValueError("Can not join other than pd.DataFrames")
      if "ID" not in df.columns:
          raise ValueError("df does not contain 'ID' column")
      df_merged = df.copy(deep=True).drop("ID", axis=1)
      df_merged = df_merged.sort_values("ds")
      df_merged = df_merged.drop_duplicates(subset=["ds"])
      df_merged = df_merged.reset_index(drop=True)
      return df_merged
  
imports: from __future__ import annotations
  import logging
  import math
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: merge_dataframes(df) and returns: df_merged