code: def constant_dataset() -> Tuple[DatasetInfo, Dataset, Dataset]:
      metadata = MetaData(
          freq="1H",
          feat_static_cat=[
              CategoricalFeatureInfo(
                  name="feat_static_cat_000", cardinality="10"
              )
          ],
          feat_static_real=[
              BasicFeatureInfo(name="feat_static_real_000")
          ],
          feat_dynamic_real=[
              BasicFeatureInfo(name=FieldName.FEAT_DYNAMIC_REAL)
          ],
      )
  
      start_date = "2000-01-01 00:00:00"
  
      train_ds = ListDataset(
          data_iter=[
              {
                  FieldName.ITEM_ID: str(i),
                  FieldName.START: start_date,
                  FieldName.TARGET: [float(i)] * 24,
                  FieldName.FEAT_STATIC_CAT: [i],
                  FieldName.FEAT_STATIC_REAL: [float(i)],
                  FieldName.FEAT_DYNAMIC_REAL: [[float(i) * 0.5] * 24],
              }
              for i in range(10)
          ],
          freq=metadata.freq,
      )
  
      test_ds = ListDataset(
          data_iter=[
              {
                  FieldName.ITEM_ID: str(i),
                  FieldName.START: start_date,
                  FieldName.TARGET: [float(i)] * 30,
                  FieldName.FEAT_STATIC_CAT: [i],
                  FieldName.FEAT_STATIC_REAL: [float(i)],
                  FieldName.FEAT_DYNAMIC_REAL: [[float(i) * 0.5] * 30],
              }
              for i in range(10)
          ],
          freq=metadata.freq,
      )
  
      info = DatasetInfo(
          name="constant_dataset",
          metadata=metadata,
          prediction_length=2,
          train_statistics=calculate_dataset_statistics(train_ds),
          test_statistics=calculate_dataset_statistics(test_ds),
      )
  
      return info, train_ds, test_ds
  
imports: import math
  import random
  from abc import abstractmethod
  from typing import Callable, Dict, List, NamedTuple, Optional, Tuple, Union, cast
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from pandas.tseries.offsets import BaseOffset, Week
  from gluonts.dataset.artificial.recipe import BinaryHolidays, BinaryMarkovChain, Constant, ForEachCat, Lag, LinearTrend, RandomCat, RandomGaussian, Stack, generate, take_as_list
  from gluonts.dataset.common import BasicFeatureInfo, CategoricalFeatureInfo, DataEntry, Dataset, ListDataset, MetaData, TrainDatasets
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.stat import DatasetStatistics, calculate_dataset_statistics
label_desc: Use image node_id 2 for calling a global function with example usage: constant_dataset() and returns: info,  train_ds,  test_ds