code: def get_current_username(
      credentials: HTTPBasicCredentials = Depends(security),
  ):
      current_username_bytes = credentials.username.encode("utf8")
      correct_username_bytes = b"stanleyjobson"
      is_correct_username = secrets.compare_digest(
          current_username_bytes, correct_username_bytes
      )
      current_password_bytes = credentials.password.encode("utf8")
      correct_password_bytes = b"swordfish"
      is_correct_password = secrets.compare_digest(
          current_password_bytes, correct_password_bytes
      )
      if not (is_correct_username and is_correct_password):
          raise HTTPException(
              status_code=status.HTTP_401_UNAUTHORIZED,
              detail="Incorrect username or password",
              headers={"WWW-Authenticate": "Basic"},
          )
      return credentials.username
  
imports: import secrets
  from fastapi import Depends, FastAPI, HTTPException, status
  from fastapi.security import HTTPBasic, HTTPBasicCredentials
label_desc: Use image node_id 1 for calling a global function with example usage: get_current_username(credentials) and returns: credentials