input: Write a python function that returns the md5 hash of a provided string. If the input string is empty, the function should return None.
  assert hash_string('Hello world') == '3e25960a79dbc69b674cd4ec67a72c62'
  assert hash_string('') == None
  assert hash_string('A B C') == '0ef78513b0cb8cef12743f5aeb35f888'
  assert hash_string('password') == '5f4dcc3b5aa765d61d8327deb882cf99'
output: def hash_string(input_string):
      if input_string == '':
          return None
      import hashlib
      return hashlib.md5(input_string.encode()).hexdigest()