code: def io_processor(forward):
      """Applies some input / output processing to PLForecastingModule.forward.
      Note that this wrapper must be added to each of PLForecastinModule's subclasses forward methods.
      Here is an example how to add the decorator:
  
      ```python
          @io_processor
          def forward(self, *args, **kwargs)
              pass
      ```
  
      Applies
      -------
      Reversible Instance Normalization
          normalizes batch input target features, and inverse transform the forward output back to the original scale
      """
  
      @wraps(forward)
      def forward_wrapper(self, *args, **kwargs):
          if not self.use_reversible_instance_norm:
              return forward(self, *args, **kwargs)
  
          # x is input batch tuple which by definition has the past features in the first element starting with the
          # first n target features
          # assuming `args[0][0]` is torch.Tensor we could clone it to prevent target re-normalization
          x: Tuple = args[0][0].clone()
          # apply reversible instance normalization
          x[:, :, : self.n_targets] = self.rin(
              x[:, :, : self.n_targets]
          )
          # run the forward pass
          out = forward(self, *((x, *args[0][1:]), *args[1:]), **kwargs)
          # inverse transform target output back to original scale; by definition the first output
          if isinstance(out, tuple):
              return self.rin.inverse(out[0]), *out[1:]
          else:
              return self.rin.inverse(out)
  
      return forward_wrapper
  
imports: from abc import ABC, abstractmethod
  from functools import wraps
  from typing import Any, Dict, Optional, Sequence, Tuple, Union
  import pytorch_lightning
  import torch
  import torch.nn
  import torchmetrics
  from joblib import Parallel, delayed
  from darts.logging import get_logger, raise_if, raise_log
  from darts.models.components.layer_norm_variants import RINorm
  from darts.timeseries import TimeSeries
  from darts.utils.likelihood_models import Likelihood
  from darts.utils.timeseries_generation import _build_forecast_series
  from darts.utils.torch import MonteCarloDropout
label_desc: Use image node_id 1 for calling a global function with example usage: io_processor(forward) and returns: forward_wrapper, forward, self,  unknown, self