class_docstr: Sampling-based super-net training but using an RL agent to control the sampling.
  
  The default implementation for :class:`~nni.nas.strategy.ENAS`.
  
  See Also
  --------
  nni.nas.strategy.ENAS
  RandomSamplingLightningModule
code: def policy(self) -> BasePolicy:
      if self._policy is None:
          raise RuntimeError("Policy is not initialized yet.")
      return self._policy
  
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 2 for calling the EnasLightningModule obj's underlying member method code with example usage: obj.policy() and returns: self