input: Write a python function to compare the similarity between two strings using difflib library.
  assert compare_strings("hello world", "hello") == 0.5454545454545454
  assert compare_strings("hello world", "hey world") == 0.9090909090909091
  assert compare_strings("apple pie", "apple pie") == 1.0
output: def compare_strings(str1, str2):
      import difflib
      return difflib.SequenceMatcher(None, str1, str2).ratio()