def METHOD_NAME(self, student_id: str, course_id: str) -> None:
    if not course_id:
        self.log.error(
            "Could not add student to course because the course_id has not "
            "been provided. Has it been set in the nbgrader_config.py?")
        return
    try:
        group_name = "nbgrader-{}".format(course_id)
        jup_groups = _query_jupyterhub_api(
            method="GET",
            api_path="/groups",
        )
        if group_name not in [x['name'] for x in jup_groups]:
            # This could result in a bad request(JupyterhubApiError) if
            # there is already a group so first we check above if there is a
            # group
            _query_jupyterhub_api(
                method="POST",
                api_path="/groups/{name}".format(name=group_name),
            )
            self.log.info("Jupyterhub group: {group_name} created.".format(
                group_name=group_name))
        _query_jupyterhub_api(
            method="POST",
            api_path="/groups/{name}/users".format(name=group_name),
            post_data={"users": [student_id]}
        )
        # Saying student could be already here is because the post request
        # returns 200 even if the student_id was already in the group
        self.log.info(
            "Student {student} added or was already in the Jupyterhub group: {group_name}".format(
                student=student_id,
                group_name=group_name))
    except JupyterhubApiError as e:
        # We assume user might be using Jupyterhub but something is not working
        err_msg = "Student {student} NOT added to the Jupyterhub group {group_name}: ".format(
            student=student_id,
            group_name=group_name
        )
        self.log.error(err_msg + str(e))
        self.log.error("Make sure you set a valid admin_user 'api_token' in your config file before starting the service")