code: def generate_by_hash(hashcode):
      
      img = Image.new(IMAGE_MODE, IMAGE_SIZE, BACKGROUND_COLOR)
      if len(hashcode) < 32:
          print ("hashcode must have lenght >= 32, %s" % hashcode)
          raise FalseHashError
  
      allowed = "0123456789abcdef"
      hashcheck = [c in allowed for c in hashcode]
      if False in hashcheck:
          print ("hashcode has not allowed structure %s" % hashcode)
          raise FalseHashError
  
      pixelmap = setup_pixelmap(hashcode)
      draw_image(pixelmap, img)
      return img
docs: Generates an PIL image avatar based on the given
      hash String. Acts as the main accessor to pagan.