def _create_inv_component_masks(
        mask_num: np.ndarray,
        mask_cat: np.ndarray,
        cat_mapping: dict[str, str],
        cols_cat: Sequence[str],
    ):
        """
        Returns a boolean array indicating which components of the TRANSFORMED
        `stat_covs` are numerical and a boolean array indicating which components
        of the TRANSFORMED `stat_covs` are categorical.

        It's important to recognize that these masks only apply to the UNTRANSFORMED
        static covariates since some transformations can generate multiple new components
        from a single component (e.g. one-hot encoding).
        """
        # check how many categorical features were generated per categorical column after transforming the data
        cat_idx = 0
        inv_mask_num, inv_mask_cat = [], []
        for is_num, is_cat in zip(mask_num, mask_cat):
            if is_num:
                inv_mask_num.append(True)
                inv_mask_cat.append(False)
            elif is_cat:
                # some categorical encoders (OneHotEncoder) generate more features and we need to keep track of that
                cat_name = cols_cat[cat_idx]
                num_cat_outputs = len(cat_mapping[cat_name])
                inv_mask_num += num_cat_outputs * [False]
                inv_mask_cat += num_cat_outputs * [True]
                cat_idx += 1
            else:  # don't scale this feature/column
                inv_mask_num.append(False)
                inv_mask_cat.append(False)
        inv_mask_num = np.array(inv_mask_num, dtype=bool)
        inv_mask_cat = np.array(inv_mask_cat, dtype=bool)
        return inv_mask_num, inv_mask_cat

        Returns a boolean array indicating which components of the TRANSFORMED
        `stat_covs` are numerical and a boolean array indicating which components
        of the TRANSFORMED `stat_covs` are categorical.

        It's important to recognize that these masks only apply to the UNTRANSFORMED
        static covariates since some transformations can generate multiple new components
        from a single component (e.g. one-hot encoding).
        
darts/dataprocessing/transformers/static_covariates_transformer.py