def METHOD_NAME():
    if not os.path.exists(AVATAR_DIR):
        os.mkdir(AVATAR_DIR)
    try:
        log = subprocess.check_output(['git', 'log',
                                       '--pretty=format:%ae!%an'])
    except (OSError, subprocess.CalledProcessError):
        print('ERROR: Unable to read git log.')
        exit(1)
    authors = [entry.split('!', 1)
               for entry in log.decode('utf-8').splitlines()]
    unique_authors = set()
    for email, author in authors:
        author = author.strip()
        if author in unique_authors:
            continue
        unique_authors.add(author)
        filename = os.path.join(AVATAR_DIR, author + '.png')
        if os.path.exists(filename):
            continue
        m = hashlib.md5()
        m.update(email.strip().lower().encode())
        uri = 'https://www.gravatar.com/avatar/%s?d=404&size=%d' % (
            m.hexdigest(),
            AVATAR_SIZE)
        print('fetching image for "%s" %s (%s)...' % (author, email, uri))
        resp = requests.get(uri, stream=True)
        if resp.status_code == 200:
            with open(filename, 'wb') as fh:
                for data in resp.iter_content():
                    fh.write(data)