def METHOD_NAME(self, bad_index):
    """CLI filespec elements with an invalid index raise an error"""
    with pytest.raises(ArgumentTypeError, match=r".* index error"):
        filespec_parser(f"pydicom::rtplan.dcm::{bad_index}")