class_docstr: Base TFDS builder.
  
  The functions to overwrite are:
  
  * `_info`: Defines dataset features and metadata (see TFDS docs:
    https://www.tensorflow.org/datasets/add_dataset#_info_dataset_metadata)
  * `split_to_scene_configs`: Define the splits and scenes
  * `generate_scene`: Generate a single scene and returns the examples.
  
  Usage: See `HelloBeamWorker` for an example.
class_docstr_tok: ["Base","TFDS","builder",".","The","functions","to","overwrite","are",":","*","`","_info","`",":","Defines","dataset","features","and","metadata","(","see","TFDS","docs",":","https",":","\/\/www.tensorflow.org\/datasets\/add_dataset","#","_info_dataset_metadata",")","*","`","split_to_scene_configs","`",":","Define","the","splits","and","scenes","*","`","generate_scene","`",":","Generate","a","single","scene","and","returns","the","examples",".","Usage",":","See","`","HelloBeamWorker","`","for","an","example","."]
docstr: Generate a single scene.
  
  This is the function which creates and render the scene.
  
  ```
  def generate_scene(self, scene_config: kb.sunds.SceneConfig):
    scene = kb.Scene.from_config(scene_config)
    ...
    render_outputs = renderer.render()
  
    # Returns the list[ex0, ex1, ...]
    return etree.unzip(render_outputs)
  ```
  
  Example(s) can be:
  
  * Singleton: 1 scene == 1 example (e.g., video, conditional nerf,...)
  * Iterable of examples. (e.g. each example is a single frame)
  
  Returns value can be:
  
  * The scene example(s): If scene is only in one split
  * A `dict` of `{'train': scene example(s)}`
  
  All the following are valid, assuming `ex` is a valid example dict (.e.g
  `{'rgb': ..., 'segmentation': ...}`):
  
  ```python
  return ex
  return [ex0, ex1, ...]
  return {'train': ex0, 'test': ex1}
  return {'train': [ex0, ex1,...], 'test': [...]}
  ```
  
  Args:
    scene_config: Config of the scene to generate.
  
  Returns:
    scene_data: All examples from the scene.
docstr_tok: ["Generate","a","single","scene",".","This","is","the","function","which","creates","and","render","the","scene",".","``","`","def","generate_scene","(","self",",","scene_config",":","kb.sunds.SceneConfig",")",":","scene","=","kb.Scene.from_config","(","scene_config",")","...","render_outputs","=","renderer.render","(",")","#","Returns","the","list","[","ex0",",","ex1",",","...","]","return","etree.unzip","(","render_outputs",")","``","`","Example","(","s",")","can","be",":","*","Singleton",":","1","scene","==","1","example","(","e.g.",",","video",",","conditional","nerf",",","...",")","*","Iterable","of","examples",".","(","e.g",".","each","example","is","a","single","frame",")","Returns","value","can","be",":","*","The","scene","example","(","s",")",":","If","scene","is","only","in","one","split","*","A","`","dict","`","of","`","{","'train","'",":","scene","example","(","s",")","}","`","All","the","following","are","valid",",","assuming","`","ex","`","is","a","valid","example","dict","(",".e.g","`","{","'rgb","'",":","...",",","'segmentation","'",":","...","}","`",")",":","``","`","python","return","ex","return","[","ex0",",","ex1",",","...","]","return","{","'train","'",":","ex0",",","'test","'",":","ex1","}","return","{","'train","'",":","[","ex0",",","ex1",",","...","]",",","'test","'",":","[","...","]","}","``","`","Args",":","scene_config",":","Config","of","the","scene","to","generate",".","Returns",":","scene_data",":","All","examples","from","the","scene","."]
code: def generate_scene(
      self,
      scene_config: SceneConfig,
  ) -> SceneOutput:
      """Generate a single scene.
  
      This is the function which creates and render the scene.
  
      ```
      def generate_scene(self, scene_config: kb.sunds.SceneConfig):
        scene = kb.Scene.from_config(scene_config)
        ...
        render_outputs = renderer.render()
  
        # Returns the list[ex0, ex1, ...]
        return etree.unzip(render_outputs)
      ```
  
      Example(s) can be:
  
      * Singleton: 1 scene == 1 example (e.g., video, conditional nerf,...)
      * Iterable of examples. (e.g. each example is a single frame)
  
      Returns value can be:
  
      * The scene example(s): If scene is only in one split
      * A `dict` of `{'train': scene example(s)}`
  
      All the following are valid, assuming `ex` is a valid example dict (.e.g
      `{'rgb': ..., 'segmentation': ...}`):
  
      ```python
      return ex
      return [ex0, ex1, ...]
      return {'train': ex0, 'test': ex1}
      return {'train': [ex0, ex1,...], 'test': [...]}
      ```
  
      Args:
        scene_config: Config of the scene to generate.
  
      Returns:
        scene_data: All examples from the scene.
      """
      raise NotImplementedError
  
imports: from __future__ import annotations
  import abc
  import collections
  import dataclasses
  import itertools
  import tempfile
  from typing import Any, Dict, Iterator, List, Optional, TypeVar, Union
  import apache_beam
  from etils import edc
  from etils import epath
  import kubric
  import tensorflow_datasets
label_desc: Use image node_id 8 for calling the KubricBuilder obj's underlying member method code with example usage: obj.generate_scene(scene_config) without return types