How about ```os.path.join(unit_root, sub_path, class_name, filename)```?