code: def get_input_dims(users, items, sparse_features, dense_features):
      # Calculate input_dims for each sparse features
      sparse_feats_input_dims = []
      for i in sparse_features:
          df = users if i in users.columns else items
          sparse_feats_input_dims.append(df[i].max() + 1)
  
      num_dense_feats = len(dense_features)
      return sparse_feats_input_dims, num_dense_feats
  
imports: import os
  import tempfile
  import numpy
  import pandas
  import scipy.sparse
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import MinMaxScaler
  import torch.utils.data
  from bigdl.dllib.utils.file_utils import is_local_path
  from bigdl.orca.data.file import get_remote_dir_to_local, get_remote_file_to_local
label_desc: Use image node_id 2 for calling a global function with example usage: get_input_dims(users, items, sparse_features, dense_features) and returns: sparse_feats_input_dims,  num_dense_feats