code: def _create_model(
      self, train_sample: Tuple[torch.Tensor]
  ) -> torch.nn.Module:
      # samples are made of (past_target, historic_future_covariates, future_covariates, future_target)
      # historic_future_covariates and future_covariates have the same width
      input_dim = train_sample[0].shape[1] + (
          train_sample[1].shape[1] if train_sample[1] is not None else 0
      )
      output_dim = train_sample[-1].shape[1]
      nr_params = (
          1
          if self.likelihood is None
          else self.likelihood.num_parameters
      )
  
      kwargs = {}
      if isinstance(self.rnn_type_or_module, str):
          model_cls = _RNNModule
          kwargs["name"] = self.rnn_type_or_module
      else:
          model_cls = self.rnn_type_or_module
      return model_cls(
          input_size=input_dim,
          target_size=output_dim,
          nr_params=nr_params,
          hidden_dim=self.hidden_dim,
          dropout=self.dropout,
          num_layers=self.n_rnn_layers,
          **self.pl_module_params,
          **kwargs,
      )
  
imports: import inspect
  from abc import ABC, abstractmethod
  from typing import Optional, Sequence, Tuple, Type, Union
  import torch
  import torch.nn
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.models.forecasting.pl_forecasting_module import PLDualCovariatesModule, io_processor
  from darts.models.forecasting.torch_forecasting_model import DualCovariatesTorchModel
  from darts.timeseries import TimeSeries
  from darts.utils.data import DualCovariatesShiftedDataset, TrainingDataset
label_desc: Use image node_id 2 for calling the RNNModel obj's underlying member method code with example usage: obj._create_model(train_sample) and returns: model_cls