human
Solve the following python programming problem given the following code:
def bind_to_ad(loaner = False, hostname = None) : 
    '
    bind_to_ad()

    Bind the machine to Active Directory
    Unbinds if bound, then binds machine to Active Directory
    ' 
    def __bind() : 
        return shell_tools.run (('
      dsconfigad -f -a %s -u "%s" -p %s -domain %s -ou %s,%s
    ' % (bind_name [: 13], config.LDAP_USER, config.LDAP_PASSWORD, config.BIND_DOMAIN, config.BIND_OU, config.BIND_DC))) 
shell_tools.run (("dsconfigad -f -r -force -u '%s' -p '%s'" % (config.LDAP_USER, config.LDAP_PASSWORD))) 
    sys_tools.configure_time () 
    bind_name = sys_tools.get_computer_name () 
    if hostname : 
        bind_name = hostname 
bind = __bind () 
    if (bind ['status'] == 70) : 
        sys_tools.log ('account_tools-bind_to_ad', 'Restarting opendirectoryd') 
        shell_tools.run ('killall opendirectoryd') 
        sys_tools.sleep (secs = 3) 
        bind = __bind () 
if (not bind ['success']) : 
        sys_tools.log ('account_tools-bind_to_ad', 'Unable to bind to AD') 
        raise Exception ('Unable to bind to Active Directory') 
bind_settings = ['dsconfigad -mobile enable', 'dsconfigad -mobileconfirm disable'] 
    for setting in bind_name : 
        shell_tools.run (('%s' % setting)) 

    
    

    Fix the buggy line: for setting in bind_name :
assistant
#Here is Python program to fix the buggy line: for setting in bind_name :
.

for setting in bind_settings :