code: def filter_weights(weights):
      """
      This function makes sure that weights are in correct format for
      regression and multitask TabNet
  
      Parameters
      ----------
      weights : int, dict or list
          Initial weights parameters given by user
  
      Returns
      -------
      None : This function will only throw an error if format is wrong
      """
      err_msg = """Please provide a list or np.array of weights for """
      err_msg += """regression, multitask or pretraining: """
      if isinstance(weights, int):
          if weights == 1:
              raise ValueError(err_msg + "1 given.")
      if isinstance(weights, dict):
          raise ValueError(err_msg + "Dict given.")
      return
  
imports: from torch.utils.data import Dataset
  from torch.utils.data import DataLoader, WeightedRandomSampler
  import torch
  import numpy
  import scipy
  import json
  from sklearn.utils import check_array
  import pandas
  import warnings
label_desc: Use image node_id 6 for calling a global function with example usage: filter_weights(weights) without return types