code: def request_access_token(self, access_code):
          "Request access token from GitHub"
          token_response = request_session.post(
              "https://github.com/login/oauth/access_token",
              data={
                  "client_id": self.oauth_client_id,
                  "client_secret": self.oauth_client_secret,
                  "code": access_code
              },
              headers={"Accept": "application/json"},
          )
          return helper_request_access_token(token_response.json()f request_access_token(self, access_code):
          "Request access token from GitHub"
          token_response = request_session.post(
              "https://github.com/login/oauth/access_token",
              data={
                  "client_id": self.oauth_client_id,
                  "client_secret": self.oauth_client_secret,
                  "code": access_code
              },
              headers={"Accept": "application/json"},
          )
          return helper_request_access_token(token_response.json())
docs: Request access token from GitHub