It would be interesting that taurus provide utility functions used by taurus/doc/buildmock.py script.
They could be included in the taurus.core.util module.