code: def create_model_card(config, sub_task, best_params, best_metrics):
      best_metrics = "\n".join(
          [f"- {k}: {v}" for k, v in best_metrics.items()]
      )
      best_params = "\n".join(
          [f"- {k}: {v}" for k, v in best_params.items()]
      )
      return MARKDOWN.format(
          task=config.task,
          dataset=config.data_path,
          metrics=best_metrics,
          params=best_params,
      )
  
imports: import copy
  from collections import defaultdict
  from dataclasses import dataclass
  from functools import partial
  from typing import List, Optional
  import numpy
  from sklearn import ensemble, impute, linear_model
  from sklearn import metrics
  from sklearn import naive_bayes, neighbors, pipeline, preprocessing, svm, tree
  from xgboost import XGBClassifier, XGBRegressor
label_desc: Use image node_id 7 for calling a global function with example usage: create_model_card(config, sub_task, best_params, best_metrics) and returns: MARKDOWN