input: Write a python function to calculate cosine similarity for a given corpus of documents.
  assert cosine_similarity(['the cat in the hat', 'the cat and the hat', 'the hat']) is not None
  assert cosine_similarity(['apple orange banana', 'banana orange', 'apple banana']) is not None
  assert cosine_similarity(['data science', 'science data', 'data']) is not None
output: from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.metrics.pairwise import cosine_similarity as cosine_similarity_sklearn
  
  def cosine_similarity(docs):
      vectorizer = TfidfVectorizer()
      tfidf_matrix = vectorizer.fit_transform(docs)
      return cosine_similarity_sklearn(tfidf_matrix)