code: def register():
      
      if webassets:
          signals.initialized.connect(add_jinja2_ext)
          signals.generator_init.connect(create_assets_env)
      else:
          logger.warning('`assets` failed to load dependency `webassets`.'
                         '`assets` plugin not loaded.')
docs: Plugin registration.