input: Write a python function to recursively list all files in a given directory.
  assert list_files("/usr") == ["/usr/bin/file1", "/usr/bin/file2", "/usr/lib/file3"]  # Assume these are the files in the "/usr" directory
  assert list_files("/emptydir") == []  # Assume "/emptydir" is an empty directory
  assert list_files("/singlefiledir") == ["/singlefiledir/file1"]  # Assume "/singlefiledir" contains only "file1"
output: import os
  
  def list_files(directory):
      file_list = []
      
      def recursive_list(dir_path):
          for entry in os.listdir(dir_path):
              full_path = os.path.join(dir_path, entry)
              if os.path.isdir(full_path):
                  recursive_list(full_path)
              else:
                  file_list.append(full_path)
      
      recursive_list(directory)
      return file_list