code: def get_head_act(act_func):
      """
      Return the actual head activation function given the activation fucntion name.
  
      Args:
          act_func (string): activation function to use. 'softmax': applies
          softmax on the output. 'sigmoid': applies sigmoid on the output.
      Returns:
          nn.Module: the activation layer.
      """
      if act_func == "softmax":
          return nn.Softmax(dim=1)
      elif act_func == "sigmoid":
          return nn.Sigmoid()
      else:
          raise NotImplementedError(
              "{} is not supported as a head activation "
              "function.".format(act_func)
          )
  
imports: from functools import partial
  import torch.nn
  from detectron2.layers import ROIAlign
  from slowfast.models.batchnorm_helper import get_norm
  from slowfast.models.video_model_builder import _POOL1, _TEMPORAL_KERNEL_BASIS
  from pytorchvideo.models.csn import create_csn
  from pytorchvideo.models.head import create_res_basic_head, create_res_roi_pooling_head
  from pytorchvideo.models.r2plus1d import create_2plus1d_bottleneck_block, create_r2plus1d
  from pytorchvideo.models.resnet import create_bottleneck_block, create_resnet
  from pytorchvideo.models.slowfast import create_slowfast
  from pytorchvideo.models.vision_transformers import create_multiscale_vision_transformers
  from pytorchvideo.models.x3d import Swish, create_x3d, create_x3d_bottleneck_block
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 1 for calling a global function with example usage: get_head_act(act_func) and returns: nn, nn