def AddLicenseFile(license, name, contents):
  """Add contents to license with title name."""

  if license != '':
    license += '\n\n'
  license += name + '\n'
  license += '=' * len(name) + '\n'
  license += contents
  return license