code: def get_dimensions_from_tensorrec_dataset(dataset):
      """
      Given a TensorFlow Dataset in the standard TensorRec format, returns the dimensions of the SparseTensor to be
      populated by the Dataset.
      :param dataset: tf.data.Dataset
      :return: (int, int)
      """
      session = get_session()
      iterator = create_tensorrec_iterator("dims_iterator")
      initializer = iterator.make_initializer(dataset)
      _, _, _, tf_d0, tf_d1 = iterator.get_next()
      session.run(initializer)
      d0, d1 = session.run([tf_d0, tf_d1])
      return d0, d1
  
file_path: tensorrec/tensorrec/input_utils.py
imports: import numpy
  from scipy import sparse
  import tensorflow
  from .session_management import get_session
label_desc: Use image node_id 4 for calling a global function with example usage: get_dimensions_from_tensorrec_dataset(dataset) and returns: d0,  d1