input: Write a python function to gzip all files in a directory.
  assert gzip_files('test_dir') is None
  assert os.path.exists('test_dir/file1.txt.gz')
  assert os.path.exists('test_dir/file2.txt.gz')
  assert not os.path.exists('test_dir/file1.txt')
  assert not os.path.exists('test_dir/file2.txt')
output: import os
  import gzip
  import shutil
  
  def gzip_files(directory):
      for filename in os.listdir(directory):
          file_path = os.path.join(directory, filename)
          if os.path.isfile(file_path):
              with open(file_path, 'rb') as f_in:
                  with gzip.open(file_path + '.gz', 'wb') as f_out:
                      shutil.copyfileobj(f_in, f_out)
              os.remove(file_path)