def create(self) -> None:
        """Creates the Dataset component to hold the examples"""
        blocks_config = get_blocks_context()
        self.root_block = Context.root_block or (
            blocks_config.root_block if blocks_config else None
        )
        if blocks_config:
            if self.root_block:
                self.root_block.extra_startup_events.append(self._start_caching)

            if self.cache_examples:

                def load_example_input(example_tuple):
                    _, example_value = example_tuple
                    processed_example = self._get_processed_example(example_value)
                    return utils.resolve_singleton(processed_example)

                def load_example_output(example_tuple):
                    example_id, _ = example_tuple
                    cached_outputs = self.load_from_cache(example_id)
                    return utils.resolve_singleton(cached_outputs)

                self.cache_event = self.load_input_event = self.dataset.click(
                    load_example_input,
                    inputs=[self.dataset],
                    outputs=self.inputs,
                    show_progress="hidden",
                    postprocess=False,
                    queue=False,
                    show_api=False,
                ).then(
                    load_example_output,
                    inputs=[self.dataset],
                    outputs=self.outputs,
                    postprocess=False,
                    api_name=self.api_name,
                    show_api=False,
                )

                if (
                    self.preload is not False
                    and self.cache_examples != "lazy"
                    and self.root_block
                ):
                    self.root_block.load(
                        load_example_input,
                        inputs=[
                            components.State(
                                (self.preload, self.non_none_examples[self.preload])
                            )
                        ],
                        outputs=self.inputs,
                        show_progress="hidden",
                        postprocess=False,
                        queue=False,
                        show_api=False,
                    )
                    self.root_block.load(
                        load_example_output,
                        inputs=[
                            components.State(
                                (self.preload, self.non_none_examples[self.preload])
                            )
                        ],
                        outputs=self.outputs,
                        postprocess=False,
                        show_progress="hidden",
                        show_api=False,
                    )

            else:

                def load_example(example_tuple):
                    _, example_value = example_tuple
                    processed_example = self._get_processed_example(example_value)
                    if len(self.inputs_with_examples) == 1:
                        return update(
                            value=processed_example[0],
                            **self.dataset.component_props[0],  # type: ignore
                        )
                    return [
                        update(
                            value=processed_example[i],
                            **self.dataset.component_props[i],  # type: ignore
                        )
                        for i in range(len(self.inputs_with_examples))
                    ]

                self.load_input_event = self.dataset.click(
                    load_example,
                    inputs=[self.dataset],
                    outputs=self.inputs_with_examples,
                    show_progress="hidden",
                    postprocess=False,
                    queue=False,
                    api_name=self.api_name,
                    show_api=False,
                )

                if self.run_on_click:
                    if self.fn is None:
                        raise ValueError(
                            "Cannot run_on_click if no function is provided"
                        )
                    self.load_input_event.then(
                        self.fn,
                        inputs=self.inputs,
                        outputs=self.outputs,
                        show_api=False,
                    )
        else:
            warnings.warn(
                f"If an Examples object is created outside a Blocks Context, make sure to call `examples.dataset.render()`{'and `examples.create()`' if self.cache_examples else ''} to render the examples in the interface."
            )
Creates the Dataset component to hold the examples
gradio/helpers.py