Where did mshr._generate(mesh, domain, resolution) go?

I trying to implement code from this discussion, however “mshr._generate mesh” seems to be longer available in the current version with pybind?

import mshr
from mshr import *
from dolfin import *

if MPI.rank(MPI.comm_world) == 0:
    mesh = Mesh(MPI.comm_self)
    domain = Circle(Point(0.0,0.0),2,0) - Circle(Point(0.0,0.0),1.0)
    mshr._generate(mesh, domain, 30)
else:
    mesh = None

print(mesh)

Any ideas how to go about it?

same question (unanswered)

https://fenicsproject.org/qa/11479/solve-independent-pde-using-mesh-generated-mshr-fenics-2016/

Hi Ben, this seems to be an issue many new users have because the tutorials and documentation of FEniCS are not updated to reflect the changes of the last version of FEniCS (except for the automatically generated documentation). Maybe you should check my post:

The FEniCS Book and non-automatically generated documentation for the 2019 version of FEniCS?

See if the demos help, https://bitbucket.org/fenics-project/mshr/src/master/demo/python/

Probably something like mesh = mshr.generate_mesh(domain, 30)