code: def get_releasenotes(project_dir=os.curdir, bugtracker_url=''):
      
      releasenotes = ''
      pkg_info_file = os.path.join(project_dir, 'PKG-INFO')
      releasenotes_file = os.path.join(project_dir, 'RELEASE_NOTES')
      if os.path.exists(pkg_info_file) and os.path.exists(releasenotes_file):
          with open(releasenotes_file) as releasenotes_fd:
              releasenotes = releasenotes_fd.read()
  
      else:
          releasenotes = api.get_releasenotes(
              repo_path=project_dir,
              bugtracker_url=bugtracker_url,
          )
  
      return releasenotes
docs: Retrieves the release notes, from the RELEASE_NOTES file (if in a package)
      or generates it from the git history.
  
      Args:
          project_dir(str): Path to the git repo of the project.
          bugtracker_url(str): Url to the bug tracker for the issues.
  
      Returns:
          str: release notes
  
      Raises:
          RuntimeError: If the release notes could not be retrieved