code: def check_models(models):
      for model in models:
          parallel_type = None
          if isinstance(
              model, torch.nn.parallel.DistributedDataParallel
          ):
              parallel_type = (
                  "torch.nn.parallel.DistributedDataParallel"
              )
          if ("apex_DDP" in sys.modules) and isinstance(
              model, apex_DDP
          ):
              parallel_type = "apex.parallel.DistributedDataParallel"
          if isinstance(model, torch.nn.parallel.DataParallel):
              parallel_type = "torch.nn.parallel.DataParallel"
          if parallel_type is not None:
              raise RuntimeError(
                  "Incoming model is an instance of {}. ".format(
                      parallel_type
                  )
                  + "Parallel wrappers should only be applied to the model(s) AFTER \n"
                  "the model(s) have been returned from amp.initialize."
              )
  
imports: import collections.abc
  from types import MethodType
  import functools
  import sys
  import warnings
  import numpy
  import torch
  from ._amp_state import _amp_state, warn_or_err
  from .handle import disable_casts
  from .scaler import LossScaler
  from ._process_optimizer import _process_optimizer
  from apex.fp16_utils import convert_network
  from ..fp16_utils import FP16_Optimizer
  from ..contrib.optimizers import FP16_Optimizer
label_desc: Use image node_id 3 for calling a global function with example usage: check_models(models) without return types