i agree with keeping the tast code path separate rather than trying to reuse the  ugly  autotest code path  i think you should pull this out in a function  possibly in a separate module tko tast py that collects all tast isms 