docstr: Updates weights dictionary according to target_mapper.
  
  Parameters
  ----------
  weights : bool or dict
      Given weights for balancing training.
  
  Returns
  -------
  bool or dict
      Same bool if weights are bool, updated dict otherwise.
docstr_tok: ["Updates","weights","dictionary","according","to","target_mapper",".","Parameters","--","--","--","--","--","weights",":","bool","or","dict","Given","weights","for","balancing","training",".","Returns","--","--","--","-","bool","or","dict","Same","bool","if","weights","are","bool",",","updated","dict","otherwise","."]
code: def weight_updater(self, weights):
      """
      Updates weights dictionary according to target_mapper.
  
      Parameters
      ----------
      weights : bool or dict
          Given weights for balancing training.
  
      Returns
      -------
      bool or dict
          Same bool if weights are bool, updated dict otherwise.
  
      """
      if isinstance(weights, int):
          return weights
      elif isinstance(weights, dict):
          return {
              self.target_mapper[key]: value
              for key, value in weights.items()
          }
      else:
          return weights
  
imports: import torch
  import numpy
  from scipy.special import softmax
  from pytorch_tabnet.utils import SparsePredictDataset, PredictDataset, filter_weights
  from pytorch_tabnet.abstract_model import TabModel
  from pytorch_tabnet.multiclass_utils import infer_output_dim, check_output_dim
  from torch.utils.data import DataLoader
  import scipy
label_desc: Use image node_id 2 for calling the TabNetClassifier obj's underlying member method code with example usage: obj.weight_updater(weights) and returns: weights, unknown, weights