4.20 How to use select with own type to find sub expressions?

Given expression such as \(3+(1+x)\sin x\) or \(3+(1+x)\sin ^2 x\) use select to find any  polynomial * sin^n  subexpressions.

restart; 
mytype_1 := ''`*`'( {polynom(And(algebraic, satisfies(u -> not has(u, I))),x), 
                     Or( 'specfunc(sin)'^integer, 'specfunc(sin)') 
                    } 
                  )'; 
select(type, 3+(1+x)*sin(x),mytype_1); 
select(type, 3+(1+x)*sin(x)^2,mytype_1);
 

Gives

                         (1 + x) sin(x) 
 
                                      2 
                        (1 + x) sin(x)