<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def roots(cls, degree, domain, kind):
 """Return optimal collocation nodes for some orthogonal polynomial."""

        basis_coefs = cls._basis_monomial_coefs(degree)
        basis_poly = cls.functions_factory(basis_coefs, domain, kind)
        return basis_poly.roots()