def METHOD_NAME(cls, duration, num_qubits=None, qid_shape=None, **kwargs):
    return cls(
        duration=duration,
        num_qubits=num_qubits,
        qid_shape=None if qid_shape is None else tuple(qid_shape),
    )