code: def get_size(data_dir):
      if not exists(
          os.path.join(data_dir, "train_parquet")
      ) or not exists(os.path.join(data_dir, "test_parquet")):
          invalidInputError(
              False, "Not train and test data parquet specified"
          )
      else:
          train_tbl = FeatureTable.read_parquet(
              os.path.join(data_dir, "train_parquet")
          )
          test_tbl = FeatureTable.read_parquet(
              os.path.join(data_dir, "test_parquet")
          )
  
      # get cat sizes
      with tempfile.TemporaryDirectory() as local_path:
          get_remote_file_to_local(
              os.path.join(data_dir, "meta/categorical_sizes.pkl"),
              os.path.join(local_path, "categorical_sizes.pkl"),
          )
          with open(
              os.path.join(local_path, "categorical_sizes.pkl"), "rb"
          ) as f:
              cat_sizes_dic = SafePickle.load(f)
  
      indicator_sizes = [cat_sizes_dic[c] for c in indicator_cols]
      print("indicator sizes: ", indicator_sizes)
      embedding_sizes = [cat_sizes_dic[c] for c in embedding_cols]
      print("embedding sizes: ", embedding_sizes)
      cross_sizes = [cat_sizes_dic[c] for c in cross_cols]
  
      return (
          train_tbl,
          test_tbl,
          indicator_sizes,
          embedding_sizes,
          cross_sizes,
      )
  
imports: from __future__ import division, print_function, unicode_literals
  import sys
  import os
  import math
  from optparse import OptionParser
  from time import time
  import tempfile
  from bigdl.friesian.utils import SafePickle
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.data.file import exists, makedirs
  from bigdl.friesian.feature import FeatureTable
  from bigdl.dllib.utils.file_utils import get_remote_file_to_local
  from bigdl.orca.learn.tf2.estimator import Estimator
  import tensorflow
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 for calling a global function with example usage: get_size(data_dir) and returns: train_tbl,  test_tbl,  indicator_sizes,  embedding_sizes,  cross_sizes