code: def get_thumbpath(self, path, key, format):
          
          relpath = os.path.dirname(path)
          thumbsdir = self.get_thumbsdir(path)
          name, _ = os.path.splitext(os.path.basename(path))
          name = '{}.{}.{}'.format(name, key, format.lower())
          return os.path.join(relpath, thumbsdir, name)
docs: Return the relative path of the thumbnail.
  
          path:
              path of the source image
          key:
              key of the thumbnail
          format:
              thumbnail file extension