docstr: Adds transformed static covariates back to original `TimeSeries`. The categorical component
  mapping is used to correctly name categorical components with a one-to-many mapping
  between their untransformed and transformed versions (e.g. components generated using
  one-hot encoding).
docstr_tok: ["Adds","transformed","static","covariates","back","to","original","`","TimeSeries","`",".","The","categorical","component","mapping","is","used","to","correctly","name","categorical","components","with","a","one-to-many","mapping","between","their","untransformed","and","transformed","versions","(","e.g",".","components","generated","using","one-hot","encoding",")","."]
code: def _add_back_static_covs(
      series: TimeSeries,
      vals_num: np.ndarray,
      vals_cat: np.ndarray,
      mask_num: np.ndarray,
      mask_cat: np.ndarray,
      col_map_cat: Dict[str, str],
  ) -> pd.DataFrame:
      """
      Adds transformed static covariates back to original `TimeSeries`. The categorical component
      mapping is used to correctly name categorical components with a one-to-many mapping
      between their untransformed and transformed versions (e.g. components generated using
      one-hot encoding).
      """
      data = {}
      idx_num, idx_cat = 0, 0
      static_cov_columns = []
      for col, is_num, is_cat in zip(
          series.static_covariates.columns, mask_num, mask_cat
      ):
          if is_num:  # numeric scaled column
              data[col] = vals_num[:, idx_num]
              static_cov_columns.append(col)
              idx_num += 1
          elif is_cat:  # categorical transformed column
              # covers one to one feature map (ordinal/label encoding) and one to multi feature (one hot encoding)
              for col_name in col_map_cat[col]:
                  if len(col_map_cat[col]) > 1:
                      col_name = str(col) + "_" + str(col_name)
                  if col_name not in static_cov_columns:
                      data[col_name] = vals_cat[:, idx_cat]
                      static_cov_columns.append(col_name)
                      idx_cat += 1
          else:  # is_num and is_cat are False -> feature is not part of transformer, use original values
              data[col] = series.static_covariates[col]
              static_cov_columns.append(col)
  
      transformed_static_covs = pd.DataFrame(
          data,
          columns=static_cov_columns,
          index=series.static_covariates.index,
      )
  
      return series.with_static_covariates(transformed_static_covs)
  
imports: from collections import OrderedDict
  from typing import Any, Dict, List, Optional, Sequence, Tuple
  import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from sklearn.preprocessing import MinMaxScaler, OrdinalEncoder
  from darts.logging import get_logger, raise_log
  from darts.timeseries import TimeSeries
  from .fittable_data_transformer import FittableDataTransformer
  from .invertible_data_transformer import InvertibleDataTransformer
label_desc: Use image node_id 11 for calling the StaticCovariatesTransformer obj's underlying member method code with example usage: obj._add_back_static_covs(series, vals_num, vals_cat, mask_num, mask_cat, col_map_cat) and returns: series