docstr: Initialize Timedataset from time-series df.
  Parameters
  ----------
      df : pd.DataFrame
          dataframe containing column ``ds``, ``y``, and optionally``ID`` and
          normalized columns normalized columns ``ds``, ``y``, ``t``, ``y_scaled``
      **kwargs : dict
          Identical to :meth:`tabularize_univariate_datetime`
docstr_tok: ["Initialize","Timedataset","from","time-series","df",".","Parameters","--","--","--","--","--","df",":","pd.DataFrame","dataframe","containing","column","``","ds","``",",","``","y","``",",","and","optionally","``","ID","``","and","normalized","columns","normalized","columns","``","ds","``",",","``","y","``",",","``","t","``",",","``","y_scaled","``","*","*","kwargs",":","dict","Identical","to",":","meth",":","`","tabularize_univariate_datetime","`"]
code: def __init__(self, df, **kwargs):
      """Initialize Timedataset from time-series df.
      Parameters
      ----------
          df : pd.DataFrame
              dataframe containing column ``ds``, ``y``, and optionally``ID`` and
              normalized columns normalized columns ``ds``, ``y``, ``t``, ``y_scaled``
          **kwargs : dict
              Identical to :meth:`tabularize_univariate_datetime`
      """
      # # TODO (future): vectorize
      timedatasets = [
          TimeDataset(df_i, df_name, **kwargs)
          for df_name, df_i in df.groupby("ID")
      ]
      self.combined_timedataset = [
          item for timedataset in timedatasets for item in timedataset
      ]
      self.length = sum(
          timedataset.length for timedataset in timedatasets
      )
  
imports: import logging
  from collections import OrderedDict, defaultdict
  from datetime import datetime
  from typing import Optional
  import numpy
  import pandas
  import torch
  from torch.utils.data.dataset import Dataset
  from neuralprophet import configure, utils
  from neuralprophet.df_utils import get_max_num_lags
  from neuralprophet.hdays_utils import get_country_holidays
label_desc: Use image node_id 1 to create a new GlobalTimeDataset object from inherited base classes: Dataset with example: obj = GlobalTimeDataset(df)