Databricks interview question

Using pytorch, write a code to train a retrieval system using contrastive loss