<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def foreignkey(element, exceptions):
    '''
    function to determine if each select field needs a create button or not
    '''
    label = element.field.__dict__['label']
    try:
        label = unicode(label)
    except NameError:
        pass
    if (not label) or (label in exceptions):
        return False
    else:
        return "_queryset" in element.field.__dict__