class_docstr: Converts a set of :class:`~torch_geometric.data.Dataset` objects into a
  :class:`pytorch_lightning.LightningDataModule` variant. It can then be
  automatically used as a :obj:`datamodule` for multi-GPU graph-level
  training via :lightning:`null`
  `PyTorch Lightning <https://www.pytorchlightning.ai>`__.
  :class:`LightningDataset` will take care of providing mini-batches via
  :class:`~torch_geometric.loader.DataLoader`.
  
  .. note::
  
      Currently only the
      :class:`pytorch_lightning.strategies.SingleDeviceStrategy` and
      :class:`pytorch_lightning.strategies.DDPStrategy` training
      strategies of :lightning:`null` `PyTorch Lightning
      <https://pytorch-lightning.readthedocs.io/en/latest/guides/
      speed.html>`__ are supported in order to correctly share data across
      all devices/processes:
  
      .. code-block::
  
          import pytorch_lightning as pl
          trainer = pl.Trainer(strategy="ddp_spawn", accelerator="gpu",
                               devices=4)
          trainer.fit(model, datamodule)
  
  Args:
      train_dataset (Dataset): The training dataset.
      val_dataset (Dataset, optional): The validation dataset.
          (default: :obj:`None`)
      test_dataset (Dataset, optional): The test dataset.
          (default: :obj:`None`)
      pred_dataset (Dataset, optional): The prediction dataset.
          (default: :obj:`None`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.loader.DataLoader`.
class_docstr_tok: ["Converts","a","set","of",":","class",":","`","~torch_geometric.data.Dataset","`","objects","into","a",":","class",":","`","pytorch_lightning.LightningDataModule","`","variant",".","It","can","then","be","automatically","used","as","a",":","obj",":","`","datamodule","`","for","multi-GPU","graph-level","training","via",":","lightning",":","`","null","`","`","PyTorch","Lightning","<","https",":","\/\/www.pytorchlightning.ai",">","`","__",".",":","class",":","`","LightningDataset","`","will","take","care","of","providing","mini-batches","via",":","class",":","`","~torch_geometric.loader.DataLoader","`",".","..","note",":",":","Currently","only","the",":","class",":","`","pytorch_lightning.strategies.SingleDeviceStrategy","`","and",":","class",":","`","pytorch_lightning.strategies.DDPStrategy","`","training","strategies","of",":","lightning",":","`","null","`","`","PyTorch","Lightning","<","https",":","\/\/pytorch-lightning.readthedocs.io\/en\/latest\/guides\/","speed.html",">","`","__","are","supported","in","order","to","correctly","share","data","across","all","devices\/processes",":","..","code-block",":",":","import","pytorch_lightning","as","pl","trainer","=","pl.Trainer","(","strategy=","''","ddp_spawn","''",",","accelerator=","''","gpu","''",",","devices=4",")","trainer.fit","(","model",",","datamodule",")","Args",":","train_dataset","(","Dataset",")",":","The","training","dataset",".","val_dataset","(","Dataset",",","optional",")",":","The","validation","dataset",".","(","default",":",":","obj",":","`","None","`",")","test_dataset","(","Dataset",",","optional",")",":","The","test","dataset",".","(","default",":",":","obj",":","`","None","`",")","pred_dataset","(","Dataset",",","optional",")",":","The","prediction","dataset",".","(","default",":",":","obj",":","`","None","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.loader.DataLoader","`","."]
code: def predict_dataloader(self) -> DataLoader:
      assert self.pred_dataset is not None
  
      kwargs = copy.copy(self.kwargs)
      kwargs.pop("sampler", None)
      kwargs.pop("batch_sampler", None)
  
      return self.dataloader(self.pred_dataset, shuffle=False, **kwargs)
  
imports: import copy
  import inspect
  import warnings
  from typing import Any, Dict, Optional, Tuple, Type, Union
  import torch
  from torch_geometric.data import Data, Dataset, HeteroData
  from torch_geometric.loader import DataLoader, LinkLoader, NodeLoader
  from torch_geometric.sampler import BaseSampler, NeighborSampler
  from torch_geometric.typing import InputEdges, InputNodes, OptTensor
label_desc: Use image node_id 6 for calling the LightningDataset obj's underlying member method code with example usage: obj.predict_dataloader() and returns: self