class_docstr: This layer randomly applies a list of modules during training.
  
  Args:
      module_list (List): List of modules
      keep_p (Optional[float]): Keep P modules from the list during training. Default: 0.8 (or 80%)
code: def __init__(
      self,
      module_list: List,
      keep_p: Optional[float] = 0.8,
      *args,
      **kwargs,
  ) -> None:
      super().__init__()
      n_modules = len(module_list)
      self.module_list = module_list
  
      self.module_indexes = [i for i in range(1, n_modules)]
      k = int(round(n_modules * keep_p))
      self.keep_k = bound_fn(min_val=1, max_val=n_modules, value=k)
  
file_path: ml-cvnets/cvnets/layers/random_layers.py
imports: import random
  from typing import List, Optional
  from torch import Tensor
  from cvnets.layers.base_layer import BaseLayer
  from utils.math_utils import bound_fn
label_desc: Use image node_id 1 to create a new RandomApply object from inherited base classes: BaseLayer with example: obj = RandomApply(module_list, keep_p)