input: Write a python function to traverse a directory and its subdirectories and return a list of file paths.
  assert list_files('test_directory') == ['test_directory/file1.txt', 'test_directory/subdir/file2.txt']
  assert list_files('empty_directory') == []
  assert list_files('single_file_directory') == ['single_file_directory/file1.txt']
output: def list_files(directory):
      import os
      file_paths = []
      for root, dirs, files in os.walk(directory):
          for file in files:
              file_paths.append(os.path.join(root, file))
      return file_paths