code: def create_releasenotes(project_dir=os.curdir, bugtracker_url=''):
      
      pkg_info_file = os.path.join(project_dir, 'PKG-INFO')
      if os.path.exists(pkg_info_file):
          return
  
      with open('RELEASE_NOTES', 'wb') as releasenotes_fd:
          releasenotes_fd.write(
              get_releasenotes(
                  project_dir=project_dir,
                  bugtracker_url=bugtracker_url,
              ).encode('utf-8') + b'\n'
          )
docs: Creates the release notes file, if not in a package.
  
      Args:
          project_dir(str): Path to the git repo of the project.
          bugtracker_url(str): Url to the bug tracker for the issues.
  
      Returns:
          None
  
      Raises:
          RuntimeError: If the release notes could not be retrieved