code: def create(self):
          
          headers = dict()
          if self.tfa_token:
              headers["X-GitHub-OTP"] = self.tfa_token
          token_name = self.app_name + platform.node()  # node specific in case the user has multiple hosts
          payload = dict(note=token_name, scopes=self.scopes)
          response = requests.post(
                  self.api_url + "authorizations", auth=(self.user, self.password),
                  headers=headers, json=payload
          )
  
          if response.status_code == 401 and "required" in response.headers.get("X-GitHub-OTP", ""):
              raise TFARequired("TFA required for the user")
          if response.status_code == 422:
              raise AlreadyExistsError("APP already exists. Please delete {} token".format(token_name))
          if response.status_code == 401:
              raise BadPassword("Bad User/Password")
          response.raise_for_status()
          return response.json()["token"]
docs: Creates a token
  
          It uses the app_name as the notes and the scopes are
          the permissions required by the application. See those
          in github when configuring an app token
  
          Raises a TFARequired if a two factor is required after
          the atempt to create it without having call tfa before