<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_image(byteio, imgfmt):
 """Saves the specified image to disk. Args: byteio (bytes):
 image bytes to save to disk. imgfmt (str):
 used as the extension of the saved file. Returns: str: a uuid for the saved image that can be added to the database entry. """

    from os import path, mkdir
    ptdir = "{}.{}".format(project, task)
    uuid = str(uuid4())

    #Save the image within the project/task specific folder.
    idir = path.join(dbdir, ptdir)
    if not path.isdir(idir):
        mkdir(idir)
        
    ipath = path.join(idir, "{}.{}".format(uuid, imgfmt))
    with open(ipath, 'wb') as f:
        f.write(byteio)

    return uuid