code: def generate(str, alg):
      
      img = Image.new(IMAGE_MODE, IMAGE_SIZE, BACKGROUND_COLOR)
      hashcode = hash_input(str, alg)
      pixelmap = setup_pixelmap(hashcode)
      draw_image(pixelmap, img)
      return img
docs: Generates an PIL image avatar based on the given
      input String. Acts as the main accessor to pagan.