def METHOD_NAME(self, **options):
    name = options.get('name')
    list = options.get('list')
    if not name and not list:
        raise CommandError("Missing identifier name for the thesaurus (--name)")
    if options.get('format') not in self.formats:
        raise CommandError(f"Invalid output format: supported formats are {', '.join(self.formats)}")
    if list:
        self.list_thesauri()
        return
    self.dump_thesaurus(name, options.get('format'), options.get('lang'))