code: def get_calibration_dataset(
      image_size, style_dataset_file, imagenet_data_dir
  ):
      """Generate calibration dataset from the training dataset.
  
      Args:
        image_size: int, image size to resize the training images to.
        style_dataset_file: str, path to the style images TFRecord file.
        imagenet_data_dir: str, path to the ImageNet data.
  
      Returns:
        (str, str) Path to the style dataset and content dataset for calibration.
      """
  
      # Load style dataset
      style_dataset = tf.data.TFRecordDataset(style_dataset_file)
      style_dataset = style_dataset.map(
          parse_function(image_size, "image_raw"),
          num_parallel_calls=tf.data.experimental.AUTOTUNE,
      )
      style_dataset = style_dataset.filter(rgb_filter_function)
  
      # Load content dataset
      tf_record_pattern = os.path.join(
          imagenet_data_dir, "%s-*" % "train"
      )
      data_files = tf.gfile.Glob(tf_record_pattern)
      content_dataset = tf.data.TFRecordDataset(data_files)
      content_dataset = content_dataset.map(
          parse_function(image_size, "image/encoded")
      )
      content_dataset = content_dataset.filter(rgb_filter_function)
  
      return style_dataset, content_dataset
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  from magenta.models.arbitrary_image_stylization import arbitrary_image_stylization_build_mobilenet_model
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: get_calibration_dataset(image_size, style_dataset_file, imagenet_data_dir) and returns: style_dataset,  content_dataset