class_docstr: Dataset for the Detection Track.
class_docstr_tok: ["Dataset","for","the","Detection","Track","."]
code: def _build_pcollection(self, pipeline, paths, split):
      beam = tfds.core.lazy_imports.apache_beam
      # We need to lazily import the oi_beam module (and thus, violate the
      # "imports only at the top" rule), so that beam is only required during the
      # generation of the dataset, and not to use the dataset itself (once built).
      # See: https://www.tensorflow.org/datasets/beam_datasets.
      import tensorflow_datasets.object_detection.open_images_challenge2019_beam as oi_beam  # pylint: disable=g-import-not-at-top,import-outside-toplevel
  
      if split == "test":
          # Note: annotations are not available for the test split.
          generate_examples_kwargs = dict(
              image_labels_filepath=None,
              box_labels_filepath=None,
              hierarchy_filepath=None,
              classes_filepath=None,
          )
      else:
          generate_examples_kwargs = dict(
              image_labels_filepath=paths[
                  "{}_image_label".format(split)
              ],
              box_labels_filepath=paths["{}_boxes".format(split)],
              hierarchy_filepath=paths["hierarchy"],
              classes_filepath=paths["classes"],
          )
      # Fill class names after the data has been downloaded.
      oi_beam.fill_class_names_in_tfds_info(
          paths["classes"], self.info.features
      )
      return (
          pipeline
          | beam.Create(paths["{}_images".format(split)])
          | "ReadImages" >> beam.ParDo(oi_beam.ReadZipFn())
          | "ProcessImages"
          >> beam.ParDo(
              oi_beam.ProcessImageFn(
                  target_pixels=self.builder_config.target_pixels,
                  jpeg_quality=72,
              )
          )
          | "GenerateExamples"
          >> beam.ParDo(
              oi_beam.CreateDetectionExampleFn(
                  **generate_examples_kwargs
              )
          )
      )
  
file_path: datasets/tensorflow_datasets/datasets/open_images_challenge2019_detection/open_images_challenge2019_detection_dataset_builder.py
imports: from __future__ import annotations
  import abc
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._build_pcollection(pipeline, paths, split) and returns: unknown