docstr: Apply leaf modules
docstr_tok: ["Apply","leaf","modules"]
code: def _create_feature_extractor(self, *args, **kwargs):
      """
      Apply leaf modules
      """
      tracer_kwargs = {}
      if "tracer_kwargs" not in kwargs:
          tracer_kwargs = {"leaf_modules": self.leaf_modules}
      else:
          tracer_kwargs = kwargs.pop("tracer_kwargs")
      return create_feature_extractor(
          *args,
          **kwargs,
          tracer_kwargs=tracer_kwargs,
          suppress_diff_warning=True,
      )
  
imports: import random
  from itertools import chain
  from typing import Mapping, Sequence
  import pytest
  import torch
  from common_utils import set_rng_seed
  from torchvision import models
  from torchvision.models._utils import IntermediateLayerGetter
  from torchvision.models.detection.backbone_utils import BackboneWithFPN, mobilenet_backbone, resnet_fpn_backbone
  from torchvision.models.feature_extraction import create_feature_extractor, get_graph_node_names
label_desc: Use image node_id 1 for calling the TestFxFeatureExtraction obj's underlying member method code with example usage: obj._create_feature_extractor() and returns: create_feature_extractor