def get_programs_data(user=None):
 programs_list = get_programs(user)
 program_types = get_program_types(user)
 program_types_lookup_dict = {program_type['name']: program_type for program_type in program_types}
 for program in programs_list:
  program['logo_image'] = program_types_lookup_dict[program['type']]['logo_image']
 return programs_list

def get_programs_data ( user = None ) : programs_list = get_programs ( user ) program_types = get_program_types ( user ) program_types_lookup_dict = { program_type [ 'name' ] : program_type for program_type in program_types } for program in programs_list : program [ 'logo_image' ] = program_types_lookup_dict [ program [ 'type' ] ] [ 'logo_image' ] return programs_list
return the list of programs after adding the programtype logo image .