def METHOD_NAME(self, config):
    try:
        get_jupyterhub_user()
    except JupyterhubEnvironmentError:
        # Not running on JupyterHub.
        raise gen.Return([])
    # We are running on JupyterHub, so maybe there's a formgrader
    # service. Check if we have a course id and if so guess the path to the
    # formgrader.
    coursedir = CourseDirectory(config=config)
    if not coursedir.course_id:
        raise gen.Return([])
    url = self.get_base_url() + "/services/" + coursedir.course_id
    auth = get_jupyterhub_authorization()
    http_client = AsyncHTTPClient()
    try:
        yield http_client.fetch(url, headers=auth)
    except:
        self.log.error("Formgrader not available at URL: %s", url)
        raise gen.Return([])
    courses = [{
        'course_id': coursedir.course_id,
        'url': url + "/lab",
        'kind': 'jupyterhub'
    }]
    raise gen.Return(courses)