def METHOD_NAME(self, *args, **options):
    translation.activate(settings.LANGUAGE_CODE)
    self.options = options
    self.get_all_items()
    if options['list']:
        for m in self.items.keys():
            self.stdout.write("{} : {}".format(m._meta.model_name, m._meta.verbose_name))
        return
    if not options['all'] and not options['model']:
        raise CommandError("You should specify model(s) or --all. Use --list to list all possibilities.")
    for RelatedModel, subitems in self.items.items():
        if options['all'] or RelatedModel._meta.model_name in options['model']:
            self.handle_related_model(RelatedModel, subitems)