Palo Alto Networks interview question

Five documents were given as Python lists. Compute TFIDF for all the words from first principles.