input: Write a python function to calculate the cosine similarity between two numpy arrays.
  assert np.isclose(cos_sim(np.array([0.5, 0.2, 0.7, 0.8]), np.array([0.9, 0.6, 0.1, 0.2])), 0.5694947974516244)
  assert np.isclose(cos_sim(np.array([1, 0, 0]), np.array([0, 1, 0])), 0.0)
  assert np.isclose(cos_sim(np.array([1, 1, 1]), np.array([1, 1, 1])), 1.0)
output: import numpy as np
  
  def cos_sim(arr1, arr2):
      dot_product = np.dot(arr1, arr2)
      norm_a = np.linalg.norm(arr1)
      norm_b = np.linalg.norm(arr2)
      return dot_product / (norm_a * norm_b)