code: def save_image(byteio, imgfmt):
      
      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
docs: 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.