code: def get_backbone(resnet, num_ftrs=64):
      last_conv_channels = list(resnet.children())[-1].in_features
      backbone = nn.Sequential(
          lightly.models.batchnorm.get_norm_layer(3, 0),
          *list(resnet.children())[:-1],
          nn.Conv2d(last_conv_channels, num_ftrs, 1),
          nn.AdaptiveAvgPool2d(1),
      )
      return backbone
  
file_path: lightly/tests/models/test_ModelsBYOL.py
imports: import unittest
  import torch
  import torch.nn
  import torchvision
  import lightly
  from lightly.models import BYOL, ResNetGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: get_backbone(resnet, num_ftrs) and returns: backbone