code: def create_input_from_dataset(
      dataset_fn: Callable[..., Any],
      files: List[str],
      io_params: Dict[str, Any],
  ) -> Tuple[Dict[str, Any], tf.Tensor]:
      """Creates input function given dataset generator and input files.
  
      Args:
        dataset_fn: A dataset generator function.
        files: A list of TFRecords filenames.
        io_params: A dictionary of IO paramaters, see DEFAULT_IO_PARAMS.
      Returns:
        features: A dictionary of mesh data training features.
        labels: A [B] `int32` tensor of per vertex class labels.
      """
      for k in DEFAULT_IO_PARAMS:
          io_params[k] = (
              io_params[k] if k in io_params else DEFAULT_IO_PARAMS[k]
          )
  
      dataset = dataset_fn(files, io_params)
      mesh_data = tf.compat.v1.data.make_one_shot_iterator(
          dataset
      ).get_next()
      mesh_data["neighbors"] = adjacency_from_edges(
          mesh_data["edges"],
          mesh_data["edge_weights"],
          mesh_data["num_edges"],
          mesh_data["num_vertices"],
      )
  
      max_num_verts = tf.reduce_max(
          input_tensor=mesh_data["num_vertices"]
      )
      features = dict(
          vertices=tf.reshape(
              mesh_data["vertices"], [-1, max_num_verts, 3]
          ),
          triangles=mesh_data["triangles"],
          neighbors=mesh_data["neighbors"],
          num_triangles=mesh_data["num_triangles"],
          num_vertices=mesh_data["num_vertices"],
      )
      labels = mesh_data["labels"]
      # Copy labels to features dictionary for estimator prediction mode.
      if not io_params["is_training"]:
          features["labels"] = mesh_data["labels"]
      return features, labels
  
file_path: graphics/tensorflow_graphics/notebooks/mesh_segmentation_dataio.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Callable, Dict, List, Tuple
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.convolution import utils
  from tensorflow_graphics.geometry.representation.mesh import utils
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 7 for calling a global function with example usage: create_input_from_dataset(dataset_fn, files, io_params) and returns: features,  labels