There exists a helper to do this in `buildbot.steps.slave.CompositeStepMixin` now.