code: def best_ensemble(
      nb_ensemble_models,
      model,
      data,
      algo,
      max_evals,
      trials,
      voting="hard",
      weights=None,
      nb_classes=None,
      functions=None,
  ):
      model_list = best_models(
          nb_models=nb_ensemble_models,
          model=model,
          data=data,
          algo=algo,
          max_evals=max_evals,
          trials=trials,
          functions=functions,
      )
      return VotingModel(model_list, voting, weights, nb_classes)
  
imports: import inspect
  import os
  import re
  import sys
  import nbformat
  import numpy
  from hyperopt import fmin
  from nbconvert import PythonExporter
  from .ensemble import VotingModel
  from .utils import remove_imports, remove_all_comments, extract_imports, temp_string, write_temp_files, determine_indent, with_line_numbers, unpack_hyperopt_vals, eval_hyperopt_space, find_signature_end
label_desc: Use image node_id 3 for calling a global function with example usage: best_ensemble(nb_ensemble_models, model, data, algo, max_evals, trials, voting, weights, nb_classes, functions) and returns: VotingModel