code: def _create_model(
      self, train_sample: MixedCovariatesTrainTensorType
  ) -> torch.nn.Module:
      (
          past_target,
          past_covariates,
          historic_future_covariates,
          future_covariates,
          static_covariates,
          future_target,
      ) = train_sample
  
      # target, past covariates, historic future covariates
      input_dim = (
          past_target.shape[1]
          + (
              past_covariates.shape[1]
              if past_covariates is not None
              else 0
          )
          + (
              historic_future_covariates.shape[1]
              if historic_future_covariates is not None
              else 0
          )
      )
  
      output_dim = future_target.shape[1]
  
      future_cov_dim = (
          future_covariates.shape[1]
          if future_covariates is not None
          else 0
      )
      static_cov_dim = (
          static_covariates.shape[0] * static_covariates.shape[1]
          if static_covariates is not None
          else 0
      )
  
      nr_params = (
          1
          if self.likelihood is None
          else self.likelihood.num_parameters
      )
  
      past_cov_dim = input_dim - output_dim - future_cov_dim
      if past_cov_dim and self.temporal_width_past >= past_cov_dim:
          logger.warning(
              f"number of `past_covariates` features is <= `temporal_width_past`, leading to feature expansion."
              f"number of covariates: {past_cov_dim}, `temporal_width_past={self.temporal_width_past}`."
          )
      if (
          future_cov_dim
          and self.temporal_width_future >= future_cov_dim
      ):
          logger.warning(
              f"number of `future_covariates` features is <= `temporal_width_future`, leading to feature expansion."
              f"number of covariates: {future_cov_dim}, `temporal_width_future={self.temporal_width_future}`."
          )
  
      return _TideModule(
          input_dim=input_dim,
          output_dim=output_dim,
          future_cov_dim=future_cov_dim,
          static_cov_dim=static_cov_dim,
          nr_params=nr_params,
          num_encoder_layers=self.num_encoder_layers,
          num_decoder_layers=self.num_decoder_layers,
          decoder_output_dim=self.decoder_output_dim,
          hidden_size=self.hidden_size,
          temporal_width_past=self.temporal_width_past,
          temporal_width_future=self.temporal_width_future,
          temporal_decoder_hidden=self.temporal_decoder_hidden,
          use_layer_norm=self.use_layer_norm,
          dropout=self.dropout,
          **self.pl_module_params,
      )
  
file_path: darts/darts/models/forecasting/tide_model.py
imports: from typing import Optional, Tuple
  import torch
  import torch.nn
  from darts.logging import get_logger, raise_log
  from darts.models.forecasting.pl_forecasting_module import PLMixedCovariatesModule, io_processor
  from darts.models.forecasting.torch_forecasting_model import MixedCovariatesTorchModel
label_desc: Use image node_id 2 for calling the TiDEModel obj's underlying member method code with example usage: obj._create_model(train_sample) and returns: _TideModule