<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_save_directory(base, source):
 """Sets the root save directory for saving screenshots. Screenshots will be saved in subdirectories under this directory by browser window size. """

    root = os.path.join(base, source)
    if not os.path.isdir(root):
        os.makedirs(root)

    world.screenshot_root = root