code: def register(cls, key, filename):
          
  
          if key in cls._stock:
              logger.info('Warning, replacing resource ' + str(key))
          cls._stock[key] = {'type': 'custom', 'filename': filename}
          logger.info('%s registered as %s' % (filename, key))
docs: Register a image file using key