code: def create_datasets(img_size, batch_size):
      (train_ds, test_ds), info = tfds.load(
          "imagenette/320px-v2",
          data_dir="/tmp/data",
          split=["train", "validation"],
          with_info=True,
          as_supervised=True,
      )
  
      num_classes = info.features["label"].num_classes
  
      def preprocessing(img, label):
          return tf.image.resize(img, (img_size, img_size)), tf.one_hot(
              label, num_classes
          )
  
      train_ds = train_ds.repeat().map(preprocessing).batch(batch_size)
      test_ds = test_ds.map(preprocessing).batch(batch_size)
      return train_ds, test_ds, info
  
file_path: BigDL/python/nano/tutorial/inference/tensorflow/tensorflow_inference_openvino.py
imports: import os
  import numpy
  import tensorflow
  from tensorflow.keras import layers, Model
  from tensorflow.keras.applications import ResNet50
  import tensorflow_datasets
  from bigdl.nano.tf.keras import InferenceOptimizer
label_desc: Use image node_id 1 for calling a global function with example usage: create_datasets(img_size, batch_size) and returns: train_ds,  test_ds,  info, tf,  tf