class_docstr: Class wrapping an InferenceLearner model and giving to it the
  huggingface interface.
  
  The class fuse both the InterfaceLearner and HuggingFace interfaces, giving
  to the final user a model which can be used whit the prefered API without
  the need of adapting the previous code.
  
  Attributes:
      network_parameters (ModelParams): Model parameters of the model.
      core_inference_learner (PytorchBaseInferenceLearner): Inference learner
          built using the Pytorch interface.
      output_structure (Dict): Original output structure of the HuggingFace
          model.
      input_names (List[str]): List of all the input keys used for the
          original HuggingFace model.
      output_type (Any, optional): Original output type of the HuggingFace
          model.
class_docstr_tok: ["Class","wrapping","an","InferenceLearner","model","and","giving","to","it","the","huggingface","interface",".","The","class","fuse","both","the","InterfaceLearner","and","HuggingFace","interfaces",",","giving","to","the","final","user","a","model","which","can","be","used","whit","the","prefered","API","without","the","need","of","adapting","the","previous","code",".","Attributes",":","network_parameters","(","ModelParams",")",":","Model","parameters","of","the","model",".","core_inference_learner","(","PytorchBaseInferenceLearner",")",":","Inference","learner","built","using","the","Pytorch","interface",".","output_structure","(","Dict",")",":","Original","output","structure","of","the","HuggingFace","model",".","input_names","(","List","[","str","]",")",":","List","of","all","the","input","keys","used","for","the","original","HuggingFace","model",".","output_type","(","Any",",","optional",")",":","Original","output","type","of","the","HuggingFace","model","."]
code: def _convert_metadata_to_inputs(metadata: LearnerMetadata) -> Dict:
      # we need to guarantee the preservation of the output structure
      # elements order.
      output_structure = OrderedDict()
      for key in metadata["output_structure_keys"]:
          output_structure[key] = metadata["output_structure"][key]
  
      inputs = {
          "output_structure": output_structure,
          "input_names": metadata["input_names"],
      }
      if metadata["output_type"] is not None:
          exec(
              f"from {metadata['output_type_module']} "
              f"import {metadata['output_type']}"
          )
          inputs["output_type"] = eval(metadata["output_type"])
      return inputs
  
imports: from abc import ABC
  from collections import OrderedDict
  from pathlib import Path
  from typing import List, Any, Dict, Union
  from nebullvm.operations.inference_learners.base import InferenceLearnerWrapper, PytorchBaseInferenceLearner, LearnerMetadata, BaseInferenceLearner
  from nebullvm.optional_modules.diffusers import StableDiffusionPipeline
  from nebullvm.optional_modules.torch import torch
  from nebullvm.tools.diffusers import postprocess_diffusers
  from nebullvm.tools.huggingface import restructure_output
  from nebullvm.tools.pytorch import get_torch_model_size
label_desc: Use image node_id 8 for calling the HuggingFaceInferenceLearner obj's underlying member method code with example usage: obj._convert_metadata_to_inputs(metadata) and returns: inputs