code: def __init__(
      self,
      n_features_in: int,
      n_stages: int,
      feature_mask_function: Callable = entmax15,
      feature_sparsity: float = 0.3,
      learnable_sparsity: bool = True,
      dropout: float = 0.0,
  ):
      super().__init__()
      self.n_features_in = n_features_in
      self.n_features_out = n_features_in
      self.feature_mask_function = feature_mask_function
      self._dropout = dropout
      self.n_stages = n_stages
      self.feature_sparsity = feature_sparsity
      self.learnable_sparsity = learnable_sparsity
      self._build_network()
  
imports: import random
  from typing import Callable
  import torch
  import torch.nn
  from pytorch_tabular.models.common.layers.activations import RSoftmax, entmax15
label_desc: Use image node_id 1 to create a new GatedFeatureLearningUnit object from inherited base classes: nn with example: obj = GatedFeatureLearningUnit(n_features_in, n_stages, feature_mask_function, feature_sparsity, learnable_sparsity, dropout)