code: def _make_smooth_weights_for_balanced_classes(y_train, mu=1.0):
      labels_dict = dict(zip(np.unique(y_train), np.bincount(y_train)))
      total = np.sum(list(labels_dict.values()))
      keys = sorted(labels_dict.keys())
      weight = []
      for i in keys:
          score = np.log(mu * total / float(labels_dict[i]))
          weight.append(score if score > 1 else 1)
      return weight
  
file_path: pytorch_tabular/src/pytorch_tabular/utils/data_utils.py
imports: import gzip
  import os
  import random
  import shutil
  import numpy
  import pandas
  import requests
  import torch
  from pandas import DataFrame, Series
  from sklearn.cluster import KMeans
  from sklearn.datasets import make_classification, make_regression
  from sklearn.preprocessing import LabelEncoder
  from .logger import get_logger
label_desc: Use image node_id 1 for calling a global function with example usage: _make_smooth_weights_for_balanced_classes(y_train, mu) and returns: weight