Move td folder into a single module file td.py