def vendor_values(data, obj):
    ' Get values from the vendor level of the xml '
    value_map = {'CCRException': 'sam_exception', 'contractingOfficerBusinessSizeDetermination': 'contracting_officers_deter'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data[key])
        except (KeyError, TypeError):
            obj[value] = None
    value_map = {'CCRException': 'sam_exception_description', 'contractingOfficerBusinessSizeDetermination': 'contracting_officers_desc'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data[key]['@description'])
        except (KeyError, TypeError):
            obj[value] = None
    value_map = {'vendorAlternateName': 'vendor_alternate_name', 'vendorDoingAsBusinessName': 'vendor_doing_as_business_n', 'vendorEnabled': 'vendor_enabled', 'vendorLegalOrganizationName': 'vendor_legal_org_name', 'vendorName': 'awardee_or_recipient_legal'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data['vendorHeader'][key])
        except (KeyError, TypeError):
            obj[value] = None
    try:
        data['vendorSiteDetails']
    except KeyError:
        data['vendorSiteDetails'] = {}
    obj = vendor_site_details_values(data['vendorSiteDetails'], obj)
    return obj
Get values from the vendor level of the xml
def vendor_values(data, obj):
    '  '
    value_map = {'CCRException': 'sam_exception', 'contractingOfficerBusinessSizeDetermination': 'contracting_officers_deter'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data[key])
        except (KeyError, TypeError):
            obj[value] = None
    value_map = {'CCRException': 'sam_exception_description', 'contractingOfficerBusinessSizeDetermination': 'contracting_officers_desc'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data[key]['@description'])
        except (KeyError, TypeError):
            obj[value] = None
    value_map = {'vendorAlternateName': 'vendor_alternate_name', 'vendorDoingAsBusinessName': 'vendor_doing_as_business_n', 'vendorEnabled': 'vendor_enabled', 'vendorLegalOrganizationName': 'vendor_legal_org_name', 'vendorName': 'awardee_or_recipient_legal'}
    for (key, value) in value_map.items():
        try:
            obj[value] = extract_text(data['vendorHeader'][key])
        except (KeyError, TypeError):
            obj[value] = None
    try:
        data['vendorSiteDetails']
    except KeyError:
        data['vendorSiteDetails'] = {}
    obj = vendor_site_details_values(data['vendorSiteDetails'], obj)
    return obj