def get_support_variables(polynomial):
support = []<EOL>if is_number_type(polynomial):<EOL><INDENT>return support<EOL><DEDENT>for monomial in polynomial.expand().as_coefficients_dict():<EOL><INDENT>mon, _ = __separate_scalar_factor(monomial)<EOL>symbolic_support = flatten(split_commutative_parts(mon))<EOL>for s in symbolic_support:<EOL><INDENT>if isinstance(s, Pow):<EOL><INDENT>base = s.base<EOL>if is_adjoint(base):<EOL><INDENT>base = base.adjoint()<EOL><DEDENT>support.append(base)<EOL><DEDENT>elif is_adjoint(s):<EOL><INDENT>support.append(s.adjoint())<EOL><DEDENT>elif isinstance(s, Operator):<EOL><INDENT>support.append(s)<EOL><DEDENT><DEDENT><DEDENT>return support<EOL>
Gets the support of a polynomial.