code: def _basis_polynomial_factory(cls, kind):
          
          valid_kind = cls._validate(kind)
          basis_polynomial = getattr(np.polynomial, valid_kind)
          return basis_polynomial
docs: Return a polynomial given some coefficients.