code: def dsinfo(request):
      from gluonts import time_feature
      from gluonts.dataset.artificial import (
          constant_dataset,
          default_synthetic,
      )
  
      if request.param == "constant":
          ds_info, train_ds, test_ds = constant_dataset()
  
          return AttrDict(
              name="constant",
              cardinality=int(
                  ds_info.metadata.feat_static_cat[0].cardinality
              ),
              freq=ds_info.metadata.freq,
              num_parallel_samples=2,
              prediction_length=ds_info.prediction_length,
              # FIXME: Should time features should not be needed for GP
              time_features=[
                  time_feature.day_of_week,
                  time_feature.hour_of_day,
              ],
              train_ds=train_ds,
              test_ds=test_ds,
          )
      elif request.param == "synthetic":
          ds_info, train_ds, test_ds = default_synthetic()
  
          return AttrDict(
              name="synthetic",
              batch_size=32,
              cardinality=int(
                  ds_info.metadata.feat_static_cat[0].cardinality
              ),
              context_length=2,
              freq=ds_info.metadata.freq,
              prediction_length=ds_info.prediction_length,
              num_parallel_samples=2,
              train_ds=train_ds,
              test_ds=test_ds,
              time_features=None,
          )
  
imports: from pathlib import Path
  from typing import List, NamedTuple
  import gluonts
  import logging
  import numpy
  import os
  import pandas
  import pytest
  import random
  import sys
  import tempfile
  import warnings
  from gluonts.model import Predictor
  from gluonts.dataset.common import ListDataset
label_desc: Use image node_id 6 for calling a global function with example usage: dsinfo(request) and returns: AttrDict, AttrDict