code: def activation_resolver(
      query: Union[Any, str] = "relu", *args, **kwargs
  ):
      base_cls = torch.nn.Module
      base_cls_repr = "Act"
      acts = [
          act
          for act in vars(torch.nn.modules.activation).values()
          if isinstance(act, type) and issubclass(act, base_cls)
      ]
      acts += [
          swish,
      ]
      act_dict = {}
      return resolver(
          acts,
          act_dict,
          query,
          base_cls,
          base_cls_repr,
          *args,
          **kwargs,
      )
  
file_path: pytorch_geometric/torch_geometric/nn/resolver.py
imports: import inspect
  from typing import Any, Optional, Union
  import torch
  from torch import Tensor
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from torch_geometric.nn.lr_scheduler import ConstantWithWarmupLR, CosineWithWarmupLR, CosineWithWarmupRestartsLR, LinearWithWarmupLR, PolynomialWithWarmupLR
  from torch_geometric.resolver import normalize_string, resolver
label_desc: Use image node_id 2 for calling a global function with example usage: activation_resolver(query) and returns: resolver