Equivalent commmand of adapt(space) in fenics 2019

Hi,
this is due to missing pybind11 interface for adapt (see discussion Adapt a function on a refined mesh)
Here is a fix that can be used for MeshFunctions, Forms, DirichletBC and FunctionSpace

cpp_code = """
    #include<pybind11/pybind11.h>
    #include<dolfin/adaptivity/adapt.h>
    #include<dolfin/mesh/Mesh.h>
    #include<dolfin/mesh/MeshFunction.h>
    #include<dolfin/fem/DirichletBC.h>
    #include<dolfin/function/FunctionSpace.h>
    #include<dolfin/fem/Form.h>

    namespace py = pybind11;

    PYBIND11_MODULE(SIGNATURE, m) {
       m.def("adapt", (std::shared_ptr<dolfin::MeshFunction<std::size_t>> (*)(const dolfin::MeshFunction<std::size_t>&,
          std::shared_ptr<const dolfin::Mesh>)) &dolfin::adapt,
          py::arg("mesh_function"), py::arg("adapted_mesh"));
       m.def("adapt", (std::shared_ptr<dolfin::DirichletBC> (*)(const dolfin::DirichletBC&,
       std::shared_ptr<const dolfin::Mesh>, const dolfin::FunctionSpace&)) &dolfin::adapt,
        py::arg("bc"), py::arg("adapted_mesh"), py::arg("S"));
       m.def("adapt", (std::shared_ptr<dolfin::FunctionSpace> (*)(const dolfin::FunctionSpace&,
       std::shared_ptr<const dolfin::Mesh>)) &dolfin::adapt,
        py::arg("space"), py::arg("adapted_mesh"));
       m.def("adapt", (std::shared_ptr<dolfin::Form> (*)(const dolfin::Form&,
       std::shared_ptr<const dolfin::Mesh>, bool)) &dolfin::adapt,
        py::arg("form"), py::arg("adapted_mesh"), py::arg("adapt_coefficients")=true);
    }
    """

adapt = compile_cpp_code(cpp_code).adapt