code: def get_weight_from_advantage(self, advantage):
      if self.indicator_fn_threshold:
          return (advantage >= self.indicator_fn_threshold).float()
  
      if self.exponent_beta:
          exp = torch.exp(advantage / self.exponent_beta)
          if self.exponent_clamp:
              exp = torch.clamp(exp, 0.0, self.exponent_clamp)
          return exp
  
imports: import copy
  import logging
  from typing import List, Optional
  import numpy
  import reagent.core.types
  import torch
  import torch.nn.functional
  from reagent.core.configuration import resolve_defaults
  from reagent.core.dataclasses import dataclass, field
  from reagent.core.parameters import RLParameters
  from reagent.models.actor import LOG_PROB_MAX, LOG_PROB_MIN
  from reagent.optimizer import Optimizer__Union, SoftUpdate
  from reagent.training.reagent_lightning_module import ReAgentLightningModule
  from reagent.training.rl_trainer_pytorch import RLTrainerMixin
label_desc: Use image node_id 2 for calling the CRRWeightFn obj's underlying member method code with example usage: obj.get_weight_from_advantage(advantage) and returns: unknown, exp