<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _basis_polynomial_factory(cls, kind):
 """Return a polynomial given some coefficients."""

        valid_kind = cls._validate(kind)
        basis_polynomial = getattr(np.polynomial, valid_kind)
        return basis_polynomial