def METHOD_NAME(name: tuple | str, spatial_dims: int | None = 1):
    """
    Create a pooling layer instance.
    For example, to create adaptiveavg layer:
    .. code-block:: python
        from monai.networks.layers import get_pool_layer
        pool_layer = get_pool_layer(("adaptiveavg", {"output_size": (1, 1, 1)}), spatial_dims=3)
    Args:
        name: a pooling type string or a tuple of type string and parameters.
        spatial_dims: number of spatial dimensions of the input.
    """
    if name == "":
        return torch.nn.Identity()
    pool_name, pool_args = split_args(name)
    pool_type = Pool[pool_name, spatial_dims]
    return pool_type(**pool_args)