code: def get_droplayer_p(layer, num_layers, stochastic_droplayer_rate):
      """Stochastic drop-layer probability.
  
      Args:
          layer: Layer index.
          num_layers: Total number of layers.
          stochastic_droplayer_rate: Probability of dropping a layer linearly grows
            from 0 to the provided value.
      Returns:
          Probability.
      """
  
      if stochastic_droplayer_rate is None:
          return None
  
      return (
          layer / max(num_layers - 1, 1)
      ) * stochastic_droplayer_rate
  
imports: import functools
  from typing import Any, Callable, Optional, Sequence, Tuple, Union
  import flax.linen
  import jax
  from jax.nn import initializers
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.projects.baselines import vit
  from scenic.projects.polyvit import polyvit_base_model
  from scenic.projects.vivit import model
label_desc: Use image node_id 3 for calling a global function with example usage: get_droplayer_p(layer, num_layers, stochastic_droplayer_rate) and returns: unknown, None