#NEWLINE# def write_vcd_header( o , model ) : #NEWLINE# #INDENT# def dedent( lines , trim = 4 ) : #NEWLINE# #INDENT# return '' . join ( [ ( x [ trim : ] + '\n' ) for x in lines . split ( '\n' ) ] ) . lstrip ( ) #NEWLINE# #UNINDENT# print ( dedent ( '\n    $date\n        {time}\n    $end\n    $version\n        PyMTL ?.??\n    $end\n    $timescale\n        {vcd_timescale}\n    $end' ) . format ( time = time . asctime ( ) , vcd_timescale = get_vcd_timescale ( dedent ) ) , file = o )