code: def provider_group_factory():
      
      for provider in all_providers():
          p = get_notifier(provider)
          provider_name = p.name
          help = f"Options for '{provider_name}'"
          group = click.Group(name=provider_name, help=help)
  
          # Notify command
          notify = partial(_notify, p=p)
          group.add_command(schema_to_command(p, "notify", notify, add_message=True))
  
          # Resources command
          resources_callback = partial(_resources, p=p)
          resources_cmd = click.Command(
              "resources",
              callback=resources_callback,
              help="Show provider resources list",
          )
          group.add_command(resources_cmd)
  
          pretty_opt = click.Option(
              ["--pretty/--not-pretty"], help="Output a pretty version of the JSON"
          )
  
          # Add any provider resources
          for resource in p.resources:
              rsc = getattr(p, resource)
              rsrc_callback = partial(_resource, rsc)
              rsrc_command = schema_to_command(
                  rsc, resource, rsrc_callback, add_message=False
              )
              rsrc_command.params.append(pretty_opt)
              group.add_command(rsrc_command)
  
          for name, description in CORE_COMMANDS.items():
              callback = func_factory(p, name)
              params = [pretty_opt]
              command = click.Command(
                  name,
                  callback=callback,
                  help=description.format(provider_name),
                  params=params,
              )
              group.add_command(command)
  
          notifiers_cli.add_command(group)
docs: Dynamically generate provider groups for all providers, and add all basic command to it