'Loads the config commands onto the remote device'

def load_config(self, commands, commit=False, replace=False):

    if (not self.check_authorization()):
        self._module.fail_json(msg='configuration    operations    require    privilege    escalation')
    use_session = os.getenv('ANSIBLE_EOS_USE_SESSIONS', True)
    try:
        use_session = int(use_session)
    except ValueError:
        pass
    if (not all((bool(use_session), self.supports_sessions))):
        return self.configure(self, commands)
    conn = get_connection(self)
    session = ('ansible_%s' % int(time.time()))
    result = {'session': session}
    (rc, out, err) = self.exec_command(('configure    session    %s' % session))
    if (rc != 0):
        self._module.fail_json(msg='unable    to    enter    configuration    mode', output=to_text(err, errors='surrogate_then_replace'))
    if replace:
        self.exec_command('rollback    clean-config')
    (rc, out, err) = self.send_config(commands)
    if (rc != 0):
        self.exec_command('abort')
        self._module.fail_json(msg=to_text(err, errors='surrogate_then_replace'), commands=commands)
    (rc, out, err) = self.exec_command('show    session-config    diffs')
    if ((rc == 0) and out):
        result['diff'] = to_text(out, errors='surrogate_then_replace').strip()
    if commit:
        self.exec_command('commit')
    else:
        self.exec_command('abort')
    return result
