code: def register_cache_buster(self, app, config=None):
          if not (config is None or isinstance(config, dict)):
              raise ValueError("`config` must be an instance of dict or None")
          bust_map = {}
          unbust_map = {}
          app.logger.debug('Starting computing hashes for static assets')
          for dirpath, dirnames, filenames in os.walk(app.static_folder):
              for filename in filenames:
                  rooted_filename = os.path.join(dirpath, filename)
                  if not self.__is_file_to_be_busted(rooted_filename):
                      continue
                  app.logger.debug(f'Computing hashes for {rooted_filename}')
                  with open(rooted_filename, 'rb') as f:
                      version = hashlib.md5(
                          f.read()
                      ).hexdigest()[:self.hash_size]
                  unbusted = os.path.relpath(rooted_filename, app.static_folder)
                  busted = f"{unbusted}?q={version}"
                  bust_map[unbusted] = busted
                  unbust_map[busted] = unbusted
          app.logger.debug('Finished Starting computing hashes for static assets')
          def bust_filename(file):
              return bust_map.get(file, file)
          def unbust_filename(file):
              return unbust_map.get(file, file)
          @app.url_defaults
          def reverse_to_cache_busted_url(endpoint, values):
              if endpoint == 'static':
                  values['filename'] = bust_filename(values['filename'])
          def debusting_static_view(*args, **kwargs):
              kwargs['filename'] = unbust_filename(kwargs.get('filename'))
              return original_static_view(*args, **kwargs)
          original_static_view = app.view_functions['static']
          app.view_functions['static'] = debusting_static_view