code: def is_subcommand_info_or_raise(self):
      if not self.is_subcommand_info:
          raise ValueError(
              f"The command info must define a subcommand_class attribute, but got: {self}."
          )
  
file_path: optimum/optimum/commands/base.py
imports: from abc import ABC
  from argparse import ArgumentParser, RawTextHelpFormatter
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, Optional, Tuple, Type
label_desc: Use image node_id 2 for calling the CommandInfo obj's underlying member method code with example usage: obj.is_subcommand_info_or_raise() without return types