code: def get_feature_extractor(
      backbone: str, return_nodes: list[str]
  ) -> GraphModule:
      """Get the feature extractor from the backbone CNN.
  
      Args:
          backbone (str): Backbone CNN network
          return_nodes (list[str]): A list of return nodes for the given backbone.
  
      Raises:
          NotImplementedError: When the backbone is efficientnet_b5
          ValueError: When the backbone is not supported
  
      Returns:
          GraphModule: Feature extractor.
      """
      model = getattr(torchvision.models, backbone)(pretrained=True)
      feature_extractor = create_feature_extractor(
          model=model, return_nodes=return_nodes
      )
      feature_extractor.eval()
  
      return feature_extractor
  
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  import torchvision
  from einops import rearrange
  from sklearn.cluster import KMeans
  from torch import Tensor, nn
  from torch.fx.graph_module import GraphModule
  from torch.nn.common_types import _size_2_t
  from torch.utils.data import DataLoader
  from torchvision.models.feature_extraction import create_feature_extractor
  from tqdm import tqdm
  from anomalib.models.cfa.anomaly_map import AnomalyMapGenerator
  from anomalib.models.components import DynamicBufferModule
  from anomalib.models.components.feature_extractors import dryrun_find_featuremap_dims
label_desc: Use image node_id 2 for calling a global function with example usage: get_feature_extractor(backbone, return_nodes) and returns: feature_extractor