class_docstr: DatasetBuilder for web_graph dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, pipeline, files, split: str):
      """Yields examples."""
      beam = tfds.core.lazy_imports.apache_beam
  
      def _get_int_feature(
          example: tf.train.Example, feature_name: str
      ) -> List[int]:
          return example.features.feature[feature_name].int64_list.value
  
      def _process_example(example: bytes, is_test=False):
          example = tf.train.Example.FromString(example)
          row_tag = _get_int_feature(example, "row_tag")[0]
          col_tag = np.array(
              _get_int_feature(example, "col_tag"), dtype=np.int64
          )
          if is_test:
              gt_tag = _get_int_feature(example, "gt_tag")
          else:
              gt_tag = []
          gt_tag = np.array(gt_tag, dtype=np.int64)
          return_dict = {
              "row_tag": row_tag,
              "col_tag": col_tag,
              "gt_tag": gt_tag,
          }
          return row_tag, return_dict
  
      return (
          pipeline
          | f"{split}_create" >> beam.Create(files)
          | f"{split}_read" >> beam.io.tfrecordio.ReadAllFromTFRecord()
          | f"{split}_process"
          >> beam.Map(_process_example, split == "test")
      )
  
file_path: datasets/tensorflow_datasets/structured/web_graph/web_graph.py
imports: from __future__ import annotations
  import dataclasses
  import os
  import textwrap
  from typing import List
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the WebGraph obj's underlying member method code with example usage: obj._generate_examples(pipeline, files, split) and returns: unknown, example, row_tag,  return_dict