def METHOD_NAME(
    self, cmd: click.Command, name: str | None = None, section: str = ""
) -> None:
    name = name or cmd.name
    if name is None:
        raise TypeError("Command has no name.")
    self.sections[section] = self.sections.get(section, []) + [(name, cmd)]
    super().METHOD_NAME(cmd, name)