class_docstr: PyTorch implementation containing all the modelling needed for your NLP task. Combines a language
  model and a prediction head. Allows for gradient flow back to the language model component.
class_docstr_tok: ["PyTorch","implementation","containing","all","the","modelling","needed","for","your","NLP","task",".","Combines","a","language","model","and","a","prediction","head",".","Allows","for","gradient","flow","back","to","the","language","model","component","."]
docstr: Label conversion to original label space, per prediction head.
  
  :param label_maps: dictionary for mapping ids to label strings
  :type label_maps: dict[int:str]
  :return: labels in the right format
code: def prepare_labels(self, **kwargs):
      """
      Label conversion to original label space, per prediction head.
  
      :param label_maps: dictionary for mapping ids to label strings
      :type label_maps: dict[int:str]
      :return: labels in the right format
      """
      all_labels = []
      # for head, label_map_one_head in zip(self.prediction_heads):
      #     labels = head.prepare_labels(label_map=label_map_one_head, **kwargs)
      #     all_labels.append(labels)
      for head in self.prediction_heads:
          labels = head.prepare_labels(**kwargs)
          all_labels.append(labels)
      return all_labels
  
imports: import copy
  import json
  import logging
  import os
  from pathlib import Path
  import multiprocessing
  import numpy
  import torch
  from torch import nn
  from transformers import AutoConfig
  from transformers.convert_graph_to_onnx import convert, quantize
  from farm.data_handler.processor import Processor
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import PredictionHead, pick_single_fn
  from farm.utils import MLFlowLogger, stack
  import farm.conversion.transformers
label_desc: Use image node_id 8 for calling the AdaptiveModel obj's underlying member method code with example usage: obj.prepare_labels() and returns: all_labels