code: def uses_key(self) -> bool:
      return bool(self.username and self.key_path)
  
imports: from typing import Optional
label_desc: Use image node_id 2 for calling the AuthCredentials obj's underlying member method code with example usage: obj.uses_key() and returns: bool