Return a polynomial given some coefficients.

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