code: def _check_for_completeness(model, layers, params, start_layer: int):
      """Checks whether all trainable parameters have been used."""
      must_have_layer_ids = set(
          id(param)
          for param in model.parameters()
          if param.requires_grad
      )
      included_layer_ids = set(
          [id(param["params"]) for param in params]
      )
      excluded_layer_ids = set(
          [
              id(sublayer)
              for i in range(0, start_layer)
              for sublayer in layers[i]
          ]
      )
      found_layer_ids = set.union(
          included_layer_ids, excluded_layer_ids
      )
  
      if len(must_have_layer_ids - found_layer_ids) != 0:
          # Not all layers were found while following naming convention
          raise ValueError(
              f'Fine-tuning arguments are not supported for transformer model "{type(model).__name__}".'
          )
  
file_path: small-text/small_text/integrations/transformers/utils/classification.py
imports: import os
  from typing import List
  from transformers import logging
  from transformers import AutoConfig, AutoModelForSequenceClassification, AutoTokenizer, PreTrainedModel
  from small_text.integrations.transformers.classifiers.base import ModelLoadingStrategy, PretrainedModelLoadingArguments
label_desc: Use image node_id 6 for calling a global function with example usage: _check_for_completeness(model, layers, params, start_layer) without return types