def get_writer_instance(writer_name):
 writer = REPORT_WRITERS_MAP[writer_name]()
 assert isinstance(writer, ReportWriter)
 return writer

def get_writer_instance ( writer_name ) : writer = REPORT_WRITERS_MAP [ writer_name ] ( ) assert isinstance ( writer , ReportWriter ) return writer
get a report writer instance by name :type writer_name: str .