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

def _nxapi_config(commands, methods='cli_conf', bsb_arg=None, **kwargs):
    '''
    Helper function to send configuration commands using NX-API.
    '''
    api_kwargs = __salt__['config.get']('nxos', {})
    api_kwargs.update(**kwargs)
    if not isinstance(commands, list):
        commands = [commands]
    try:
        ret = _nxapi_request(commands, **kwargs)
        if api_kwargs.get('no_save_config'):
            pass
        else:
            _nxapi_request(COPY_RS, **kwargs)
        for each in ret:
            if 'Failure' in each:
                log.error(each)
    except CommandExecutionError as e:
        log.error(e)
        return [commands, repr(e)]
    return [commands, ret]