def METHOD_NAME(doc_retriever,passages,query,top_k, row=None):
    """
    The get_top_k_passages function takes in a doc_retriever object, a list of passages and the query.
    It then encodes the passages and query using the doc_retriever's encode function. It then normalizes
    the embeddings for both corpus and query. Then it performs semantic search on corpus embeddings with 
    query embedding as input to get top k hits which are returned as a list of dictionaries containing 
    corpus id, score, passage text.
    Args:
        doc_retriever: Encode the passages and query
        passages: Retrieve the passages from the index
        query: Query the passage for a specific information
        top_k: Specify the number of passages to return
        row: Pass in the row 
    Returns:
        The top k passages that are most relevant to the query
    """
    old_passages = passages
    if row is not None:
        row_str = ""
        for k, v in row.items():
            row_str += " " + k + " is " + v + " . "
        passages = [row_str+passage for passage in passages]
    corpus_embeddings = doc_retriever.encode(passages, convert_to_tensor=True, show_progress_bar=False)
    corpus_embeddings = util.normalize_embeddings(corpus_embeddings)
    query_embeddings = doc_retriever.encode([query], convert_to_tensor=True)
    query_embeddings = util.normalize_embeddings(query_embeddings)
    hits = util.semantic_search(query_embeddings, corpus_embeddings, top_k=top_k, score_function=util.dot_score)
    hits = hits[0]
    relevant_sents =[]
    for hit in hits:
        relevant_sents.append(old_passages[hit['corpus_id']])
    return relevant_sents