code: def get_dropout_layer(
      name: tuple | str | float | int, dropout_dim: int | None = 1
  ):
      """
      Create a dropout layer instance.
  
      For example, to create dropout layers:
  
      .. code-block:: python
  
          from monai.networks.layers import get_dropout_layer
  
          d_layer = get_dropout_layer(name="dropout")
          a_layer = get_dropout_layer(name=("alphadropout", {"p": 0.25}))
  
      Args:
          name: a dropout ratio or a tuple of dropout type and parameters.
          dropout_dim: the spatial dimension of the dropout operation.
      """
      if name == "":
          return torch.nn.Identity()
      if isinstance(name, (int, float)):
          # if dropout was specified simply as a p value, use default name and make a keyword map with the value
          drop_name = Dropout.DROPOUT
          drop_args = {"p": float(name)}
      else:
          drop_name, drop_args = split_args(name)
      drop_type = Dropout[drop_name, dropout_dim]
      return drop_type(**drop_args)
  
file_path: MONAI/monai/networks/layers/utils.py
imports: from __future__ import annotations
  import torch.nn
  from monai.networks.layers.factories import Act, Dropout, Norm, Pool, split_args
  from monai.utils import has_option
label_desc: Use image node_id 3 for calling a global function with example usage: get_dropout_layer(name, dropout_dim) and returns: drop_type, torch