The interviewer presents a custom (non-standard) attention algorithm — not the standard scaled dot-product attention — and asks the candidate to implement it from scratch in PyTorch. The code must actually run and pass the provided tests. After the implementation is complete, the interviewer…