docstr: take a file and the authors name, generate metadata
  metadata requirements: https://learn.microsoft.com/contribute/metadata
  Azure Doc require MS authors and contributors need to make content contributions through the private repository
  so the content can be staged and validated by the current validation rules. (Jan 4th, 2023)
docstr_tok: ["take","a","file","and","the","authors","name",",","generate","metadata","metadata","requirements",":","https",":","\/\/learn.microsoft.com\/contribute\/metadata","Azure","Doc","require","MS","authors","and","contributors","need","to","make","content","contributions","through","the","private","repository","so","the","content","can","be","staged","and","validated","by","the","current","validation","rules",".","(","Jan","4th",",","2023",")"]
code: def _generate_metadata_header(self, metadata):
      """
      take a file and the authors name, generate metadata
      metadata requirements: https://learn.microsoft.com/contribute/metadata
      Azure Doc require MS authors and contributors need to make content contributions through the private repository
      so the content can be staged and validated by the current validation rules. (Jan 4th, 2023)
      """
      if "ms.date" not in metadata:
          update_date = datetime.today().strftime("%m/%d/%Y")
          metadata["ms.date"] = update_date
      else:
          warnings.warn(
              "ms.date is set in manifest file, the date won't be automatically updated. "
              "to update date automatically, remove ms.date from manifest file"
          )
      formatted_list = (
          ["---"]
          + ["{k}: {v}".format(k=k, v=v) for k, v in metadata.items()]
          + ["---\n"]
      )
      return "\n".join(formatted_list)
  
imports: import os
  import pathlib
  import re
  import shutil
  import warnings
  from datetime import datetime
  from os.path import basename, dirname
  from typing import List
  from urllib.parse import urlparse
  import markdown
  import pypandoc
  import requests
  from bs4 import BeautifulSoup
  from docgen.core import Channel, ParallelChannel
  from markdownify import ATX, MarkdownConverter
  from nbconvert import MarkdownExporter
  from nbformat import read
  from traitlets.config import Config
label_desc: Use image node_id 8 for calling the FabricChannel obj's underlying member method code with example usage: obj._generate_metadata_header(metadata) and returns: str