def METHOD_NAME():
    """
    The following code tests such a folder structure:
    .
    └── temp_dir/
        ├── test.txt
        └── dir1/
            ├── dir2
            └── test2.txt
    """
    with tempfile.TemporaryDirectory() as temp_dir:
        old_location = os.getcwd()
        os.chdir(temp_dir)
        test1 = "test.txt"
        open(test1, "a").close()
        dir1 = "dir1"
        dir2 = "dir2"
        os.makedirs(os.path.join(dir1, dir2))
        test2 = os.path.join(dir1, "test2.txt")
        open(test2, "a").close()
        result = _get_local_objs_to_upload_and_s3_prefix(folder_to_upload=temp_dir)
        print(result)
        assert (os.path.join(temp_dir, test1), test1) in result
        assert (os.path.join(temp_dir, test2), test2) in result
        assert len(result) == 2
        os.chdir(old_location)  # Windows will fail if chdir to tempdir https://bugs.python.org/issue42796