def initialize_report(report_type, start_date, end_date, start_letter=None, end_letter=None):
 for item in REPORT_TYPES:
  if (report_type in item):
   return item[1](start_date, end_date, start_letter, end_letter)
 raise ReportTypeDoesNotExistException

def initialize_report ( report_type , start_date , end_date , start_letter = None , end_letter = None ) : for item in REPORT_TYPES : if ( report_type in item ) : return item [ 1 ] ( start_date , end_date , start_letter , end_letter ) raise ReportTypeDoesNotExistException
creates the appropriate type of report object based on the string report_type .