def METHOD_NAME(self):
    """Return the local avatar URL or one from Gravatar"""
    if self.avatar:
        return self.avatar.url
    default_url = "https://lutris.net" + settings.STATIC_URL + "images/default-avatar.png"
    size = 64
    return (
        "https://www.gravatar.com/avatar/%s?%s" % (
            hashlib.md5(self.email.encode('utf-8').lower()).hexdigest(),
            urlencode({'d': default_url, 's': str(size)})
        )
    )