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