class_docstr: Search implementation of :class:`~nni.nas.strategy.RandomOneShot`.
  
  Do not need extra preprocessing of dataloader.
  
  See Also
  --------
  nni.nas.strategy.RandomOneShot
  nni.nas.pytorch.oneshot.base_lightning.BaseOneShotLightningModule
code: def training_step(self, *args: Any, **kwargs: Any):
      self.resample()
      self.log("sampling_attempt", self._sampling_attempt)
      return self.training_module.training_step(*args, **kwargs)
  
imports: from __future__ import annotations
  import warnings
  import logging
  from typing import Any, Callable, TYPE_CHECKING
  import pytorch_lightning
  import torch
  from nni.mutable import Sample
  from nni.nas.nn.pytorch import ModelSpace
  from .base_lightning import BaseOneShotLightningModule
  from .profiler import ProfilerPenalty, ExpectationProfilerPenalty, SampleProfilerPenalty
label_desc: Use image node_id 5 for calling the RandomSamplingLightningModule obj's underlying member method code with example usage: obj.training_step() and returns: self