code: def build_basic_auth(username: str, password: str) -> str:
      
      # https://tools.ietf.org/html/rfc7617#section-2
      assert ":" not in username
      user_pass = f"{username}:{password}"
      basic_credentials = base64.b64encode(user_pass.encode()).decode()
      return "Basic " + basic_credentials
docs: Build an Authorization header for HTTP Basic Auth.