':param local_policy:
:param sp_name_qualifier:
:param name_id_policy:
:param name_qualifier:
:return:'

def nim_args(self, local_policy=None, sp_name_qualifier='', name_id_policy=None, name_qualifier=''):

    logger.debug(('local_policy:    %s,    name_id_policy:    %s' % (local_policy, name_id_policy)))
    if (name_id_policy and name_id_policy.sp_name_qualifier):
        sp_name_qualifier = name_id_policy.sp_name_qualifier
    else:
        sp_name_qualifier = sp_name_qualifier
    if (name_id_policy and name_id_policy.format):
        nameid_format = name_id_policy.format
    elif local_policy:
        nameid_format = local_policy.get_nameid_format(sp_name_qualifier)
    else:
        raise SAMLError('Unknown    NameID    format')
    if (not name_qualifier):
        name_qualifier = self.name_qualifier
    return {'nformat': nameid_format, 'sp_name_qualifier': sp_name_qualifier, 'name_qualifier': name_qualifier}
