class_docstr: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
code: def apply_to_final_layer(self, func):
      func(self.final)
      if self.with_supervision:
          func(self.supervision_c4)
          func(self.supervision_c3)
          func(self.supervision_c2)
          func(self.supervision_c1)
  
file_path: pytorch-toolbelt/pytorch_toolbelt/modules/heads/segformer_head.py
imports: from typing import List, Optional
  import torch
  import torch.nn
  from torch import Tensor
  from pytorch_toolbelt.datasets import name_for_stride
  from pytorch_toolbelt.modules import instantiate_activation_block, ACT_GELU
  from pytorch_toolbelt.modules.interfaces import AbstractHead, FeatureMapsSpecification
label_desc: Use image node_id 3 for calling the SegFormerHead obj's underlying member method code with example usage: obj.apply_to_final_layer(func) without return types