code: def test_mobilenet_backbone(backbone_name):
      with pytest.raises(
          ValueError, match=r"Trainable layers should be in the range"
      ):
          mobilenet_backbone(
              backbone_name=backbone_name,
              weights=None,
              fpn=False,
              trainable_layers=-1,
          )
      with pytest.raises(
          ValueError,
          match=r"Each returned layer should be in the range",
      ):
          mobilenet_backbone(
              backbone_name=backbone_name,
              weights=None,
              fpn=True,
              returned_layers=[-1, 0, 1, 2],
          )
      with pytest.raises(
          ValueError,
          match=r"Each returned layer should be in the range",
      ):
          mobilenet_backbone(
              backbone_name=backbone_name,
              weights=None,
              fpn=True,
              returned_layers=[3, 4, 5, 6],
          )
      model_fpn = mobilenet_backbone(
          backbone_name=backbone_name, weights=None, fpn=True
      )
      assert isinstance(model_fpn, BackboneWithFPN)
      model = mobilenet_backbone(
          backbone_name=backbone_name, weights=None, fpn=False
      )
      assert isinstance(model, torch.nn.Sequential)
  
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 2 for calling a global function with example usage: test_mobilenet_backbone(backbone_name) without return types