code: def to_textline_dataset(files_with_sizes, config):
      def parse_csv(value):
          cont_defaults = [[0.0] for i in range(1, 14)]
          cate_defaults = [[0] for i in range(1, 27)]
          label_defaults = [[0]]
          column_headers = TRAIN_DATA_COLUMNS
          record_defaults = (
              label_defaults + cont_defaults + cate_defaults
          )
          columns = tf.io.decode_csv(
              value, record_defaults=record_defaults
          )
          all_columns = collections.OrderedDict(
              zip(column_headers, columns)
          )
          labels = all_columns.pop(LABEL_COLUMN[0])
          features = all_columns
          # EmbeddingVariable only supports int64 not int32.
          for j in range(len(CATEGORICAL_COLUMNS)):
              features[CATEGORICAL_COLUMNS[j]] = tf.cast(
                  features[CATEGORICAL_COLUMNS[j]], dtype=tf.int64
              )
          return features, labels
  
      print(files_with_sizes)
      files = [pair[0] for pair in files_with_sizes]
      data_size = sum([pair[1] for pair in files_with_sizes])
  
      dataset = tf.data.TextLineDataset(files)
      dataset = dataset.shuffle(
          buffer_size=20000, seed=config["seed"]
      )  # fix seed for reproducing
      dataset = dataset.repeat(config["no_of_epochs"])
      dataset = dataset.prefetch(config["batch_size"])
      dataset = dataset.batch(config["batch_size"])
      dataset = dataset.map(parse_csv, num_parallel_calls=28)
      dataset = dataset.prefetch(2)
      return dataset, data_size
  
imports: import time
  import argparse
  import tensorflow
  import os
  import sys
  import math
  import collections
  from tensorflow.python.client import timeline
  import json
  from tensorflow.python.ops import partitioned_variables
  import ray
  from bigdl.dllib.utils.log4Error import *
  from bigdl.orca import init_orca_context, stop_orca_context, OrcaContext
  from bigdl.orca.data.utils import process_spark_xshards
  from bigdl.orca.learn.utils import maybe_dataframe_to_xshards
  from bigdl.friesian.feature import FeatureTable
label_desc: Use image node_id 10 for calling a global function with example usage: to_textline_dataset(files_with_sizes, config) and returns: dataset,  data_size, features,  labels