human
I wrote the below code

    def extract_course_registration(registration_code, features, csv_type):
        '    convert    registration_code    to    dictionary\n                                :param    registration_code:\n                                :param    features:\n                                :param    csv_type:\n                                '
        site_name = configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME)
        registration_features = [x for x in COURSE_REGISTRATION_FEATURES if (x in features)]
        course_registration_dict = dict(((feature, getattr(registration_code, feature)) for feature in registration_features))
        course_registration_dict['company_name'] = None
        if registration_code.invoice_item:
            course_registration_dict['company_name'] = registration_code.invoice_item.invoice.company_name
        course_registration_dict['redeemed_by'] = None
        if registration_code.invoice_item:
            sale_invoice = registration_code.invoice_item.invoice
            course_registration_dict['invoice_id'] = sale_invoice.id
            course_registration_dict['purchaser'] = sale_invoice.recipient_name
            course_registration_dict['customer_reference_number'] = sale_invoice.customer_reference_number
            course_registration_dict['internal_reference'] = sale_invoice.internal_reference
        course_registration_dict['redeem_code_url'] = 'http://{base_url}{redeem_code_url}'.format(base_url=site_name, redeem_code_url=reverse('register_code_redemption', kwargs={'registration_code': registration_code.code}))
        if (csv_type is not None):
            try:
                redemption_set = registration_code.registrationcoderedemption_set
                redeemed_by = redemption_set.get(registration_code=registration_code).redeemed_by
                course_registration_dict['redeemed_by'] = redeemed_by.email
            except ObjectDoesNotExist:
                pass
        course_registration_dict['course_id'] =...

What's a good function header?
assistant
#Here's a good function header.

def course_registration_features(features, registration_codes, csv_type):