code: def create_dataset_from_tfrecords(
      tfrecords: List[str], params: Dict[str, Any]
  ) -> tf.data.Dataset:
      """Creates a mesh dataset given a list of tf records filenames.
  
      Args:
        tfrecords: A list of TFRecords filenames.
        params: A dictionary of IO paramaters, see DEFAULT_IO_PARAMS.
      Returns:
        A tf.data.Dataset, with each element a dictionary of batched mesh data
          with following fields:
          'vertices': A [B, V, 3] `float32` tensor of vertex positions, possibly
            0-padded.
          'triangles': A [B, T, 3] `int32` tensor of triangle vertex indices,
            possibly 0-padded
          'labels': A [B, V] `int32` tensor of per vertex class labels, possibly
            0-padded
          'edges': A [B, E, 2] `int32` tensor of unique directed edges in mesh,
            possibly 0-padded
          'edge_weights': A [B, E] `float32` tensor of vertex degree based edge
            weights, possibly 0-padded.
          'num_edges': A [B] `int32` tensor of number of unique directed edges in
            each mesh in the batch.
          'num_vertices':  A [B] `int32` tensor of number of vertices in each mesh
            in the batch.
          'num_triangles': A [B] `int32` tensor of number of triangles in each mesh
            in the batch.
      """
  
      def _set_default_if_none(param, param_dict, default_val):
          if param not in param_dict:
              return default_val
          else:
              return (
                  default_val
                  if param_dict[param] is None
                  else param_dict[param]
              )
  
      is_training = params["is_training"]
      shuffle = _set_default_if_none("shuffle", params, is_training)
      repeat = _set_default_if_none("repeat", params, is_training)
      sloppy = _set_default_if_none("sloppy", params, is_training)
  
      if not isinstance(tfrecords, list):
          tfrecords = [tfrecords]
      dataset = _tfrecords_to_dataset(
          tfrecords, params["parallel_threads"], shuffle, repeat, sloppy
      )
      dataset = dataset.map(
          _parse_tfex_proto, tf.data.experimental.AUTOTUNE
      )
      dataset = dataset.map(
          lambda x: _parse_mesh_data(
              x, mean_center=params["mean_center"]
          ),
          tf.data.experimental.AUTOTUNE,
      )
      if repeat:
          dataset = dataset.repeat()
      if shuffle:
          dataset = dataset.shuffle(params["shuffle_buffer_size"])
      return dataset.padded_batch(
          params["batch_size"],
          padded_shapes={
              "vertices": [None, 3],
              "labels": [None],
              "triangles": [None, 3],
              "edges": [None, 2],
              "edge_weights": [None],
              "num_edges": [],
              "num_vertices": [],
              "num_triangles": [],
          },
          drop_remainder=is_training,
      )
  
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 6 for calling a global function with example usage: create_dataset_from_tfrecords(tfrecords, params) and returns: dataset, default_val, unknown