class_docstr: Parameters
  ----------
  freq
      Frequency of the data to train on and predict.
  prediction_length
      Length of the prediction horizon.
  context_length
      Number of previous time series values provided as input to the encoder.
      (default: None).
  trainer
      Trainer object to be used (default: Trainer())
  hidden_dim
      Size of the LSTM & transformer hidden states.
  variable_dim
      Size of the feature embeddings.
  num_heads
      Number of attention heads in self-attention layer in the decoder.
  quantiles
      List of quantiles that the model will learn to predict.
      Defaults to [0.1, 0.5, 0.9]
  num_instances_per_series
      Number of samples to generate for each time series when training.
  dropout_rate
      Dropout regularization parameter (default: 0.1).
  time_features
      List of time features, from :py:mod:`gluonts.time_feature`, to use as
      dynamic real features in addition to the provided data (default: None,
      in which case these are automatically determined based on freq).
  static_cardinalities
      Cardinalities of the categorical static features.
  dynamic_cardinalities
      Cardinalities of the categorical dynamic features that are known in the future.
  static_feature_dims
      Sizes of the real-valued static features.
  dynamic_dims
      Sizes of the real-valued dynamic features that are known in the future.
  past_dynamic_features
      List of names of the real-valued dynamic features that are only known in the past.
  train_sampler
      Controls the sampling of windows during training.
  validation_sampler
      Controls the sampling of windows during validation.
  batch_size
      The size of the batches to be used training and prediction.
class_docstr_tok: ["Parameters","--","--","--","--","--","freq","Frequency","of","the","data","to","train","on","and","predict",".","prediction_length","Length","of","the","prediction","horizon",".","context_length","Number","of","previous","time","series","values","provided","as","input","to","the","encoder",".","(","default",":","None",")",".","trainer","Trainer","object","to","be","used","(","default",":","Trainer","(",")",")","hidden_dim","Size","of","the","LSTM","&","transformer","hidden","states",".","variable_dim","Size","of","the","feature","embeddings",".","num_heads","Number","of","attention","heads","in","self-attention","layer","in","the","decoder",".","quantiles","List","of","quantiles","that","the","model","will","learn","to","predict",".","Defaults","to","[","0.1",",","0.5",",","0.9","]","num_instances_per_series","Number","of","samples","to","generate","for","each","time","series","when","training",".","dropout_rate","Dropout","regularization","parameter","(","default",":","0.1",")",".","time_features","List","of","time","features",",","from",":","py",":","mod",":","`","gluonts.time_feature","`",",","to","use","as","dynamic","real","features","in","addition","to","the","provided","data","(","default",":","None",",","in","which","case","these","are","automatically","determined","based","on","freq",")",".","static_cardinalities","Cardinalities","of","the","categorical","static","features",".","dynamic_cardinalities","Cardinalities","of","the","categorical","dynamic","features","that","are","known","in","the","future",".","static_feature_dims","Sizes","of","the","real-valued","static","features",".","dynamic_dims","Sizes","of","the","real-valued","dynamic","features","that","are","known","in","the","future",".","past_dynamic_features","List","of","names","of","the","real-valued","dynamic","features","that","are","only","known","in","the","past",".","train_sampler","Controls","the","sampling","of","windows","during","training",".","validation_sampler","Controls","the","sampling","of","windows","during","validation",".","batch_size","The","size","of","the","batches","to","be","used","training","and","prediction","."]
code: def create_training_data_loader(
      self,
      data: Dataset,
      **kwargs,
  ) -> DataLoader:
      input_names = get_hybrid_forward_input_names(
          TemporalFusionTransformerTrainingNetwork
      )
      instance_splitter = self._create_instance_splitter("training")
      return TrainDataLoader(
          dataset=data,
          transform=instance_splitter + SelectFields(input_names),
          batch_size=self.batch_size,
          stack_fn=partial(
              batchify, ctx=self.trainer.ctx, dtype=self.dtype
          ),
          **kwargs,
      )
  
imports: from functools import partial
  from itertools import chain
  from typing import Dict, List, Optional
  from mxnet.gluon import HybridBlock
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.loader import DataLoader, TrainDataLoader, ValidationDataLoader
  from gluonts.model.forecast_generator import QuantileForecastGenerator
  from gluonts.mx.batchify import batchify
  from gluonts.mx.model.estimator import GluonEstimator
  from gluonts.mx.model.predictor import RepresentableBlockPredictor
  from gluonts.mx.trainer import Trainer
  from gluonts.mx.util import copy_parameters, get_hybrid_forward_input_names
  from gluonts.time_feature import Constant, TimeFeature, time_features_from_frequency_str
  from gluonts.transform import AddObservedValuesIndicator, AddTimeFeatures, AsNumpyArray, Chain, ExpectedNumInstanceSampler, InstanceSampler, SelectFields, SetField, TestSplitSampler, Transformation, ValidationSplitSampler, VstackFeatures
  from gluonts.transform.split import TFTInstanceSplitter
  from ._network import TemporalFusionTransformerPredictionNetwork, TemporalFusionTransformerTrainingNetwork
  from ._transform import BroadcastTo
label_desc: Use image node_id 4 for calling the TemporalFusionTransformerEstimator obj's underlying member method code with example usage: obj.create_training_data_loader(data) and returns: TrainDataLoader