How to customize the basis function on the FiniteElement?

Hi, there

I want to define a new basis function in FEnics and use it as a shape function to solve PDE. In other words, how can I use the Bernstein polynomial basis function instead of the Lagrange basis function as the shape function in FEniCS? Is there any convenient method in FEniCS?