def __init__(self,<EOL>label,<EOL>snapshot_type='<STR_LIT>',<EOL>num_qubits=<NUM_LIT:0>,<EOL>num_clbits=<NUM_LIT:0>,<EOL>params=None):
if not isinstance(label, str):<EOL><INDENT>raise ExtensionError('<STR_LIT>')<EOL><DEDENT>self._label = label<EOL>self._snapshot_type = snapshot_type<EOL>if params is None:<EOL><INDENT>params = []<EOL><DEDENT>super().__init__('<STR_LIT>', num_qubits, num_clbits, params)<EOL>
Create new snapshot instruction.

        Args:
            label (str): the snapshot label for result data.
            snapshot_type (str): the type of the snapshot.
            num_qubits (int): the number of qubits for the snapshot type [Default: 0].
            num_clbits (int): the number of classical bits for the snapshot type [Default: 0].
            params (list or None): the parameters for snapshot_type [Default: None].

        Raises:
            ExtensionError: if snapshot label is invalid.