input: Write a python function to convert data model in a markdown file.
  assert data_model_as_table({"metrics": {}, "sources": {}}) == "# Quality-time metrics and sources\n\nThis document lists all [metrics](#metrics) that *Quality-time* can measure and all [sources](#sources) that *Quality-time* can use to measure the metrics. For each [supported combination of metric and source](#supported-metric-source-combinations), it lists the parameters that can be used to configure the source.\n\n## Metrics\n\n| Name | Description | Default target | Scale(s) | Default tags | Sources¹ |\n| :---- | :----------- | :-------------- | :------- | :------------ | :------- |\n\n## Sources\n\n| Name | Description | Metrics |\n| :---- | :----------- | :------- |\n\n¹) All metrics with the count or percentage scale can be measured using the 'Manual number' source.\n\n## Supported metric-source combinations\n"
  assert isinstance(data_model_as_table(get_data_model()), str)
output: def data_model_as_table(data_model):
      markdown = [
          "# Quality-time metrics and sources\n",
          "This document lists all [metrics](#metrics) that *Quality-time* can measure and all [sources](#sources) that *Quality-time* can use to measure the metrics. For each [supported combination of metric and source](#supported-metric-source-combinations), it lists the parameters that can be used to configure the source.\n",
          "## Metrics\n",
          "| Name | Description | Default target | Scale(s) | Default tags | Sources¹ |\n",
          "| :---- | :----------- | :-------------- | :------- | :------------ | :------- |\n"
      ]
  
      for metric_name, metric_info in data_model.get("metrics", {}).items():
          markdown.append(f"| {metric_name} | {metric_info.get('description', '')} | {metric_info.get('default_target', '')} | {', '.join(metric_info.get('scales', []))} | {', '.join(metric_info.get('default_tags', []))} | {', '.join(metric_info.get('sources', []))} |\n")
  
      markdown.append("\n## Sources\n")
      markdown.append("| Name | Description | Metrics |\n")
      markdown.append("| :---- | :----------- | :------- |\n")
  
      for source_name, source_info in data_model.get("sources", {}).items():
          markdown.append(f"| {source_name} | {source_info.get('description', '')} | {', '.join(source_info.get('metrics', []))} |\n")
  
      markdown.append("\n¹) All metrics with the count or percentage scale can be measured using the 'Manual number' source.\n")
      markdown.append("\n## Supported metric-source combinations\n")
  
      return ''.join(markdown)