<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_xmlsec_binary(paths=None):
 """ Tries to find the xmlsec1 binary. :param paths: Non-system path paths which should be searched when looking for xmlsec1 :return: full name of the xmlsec1 binary found. If no binaries are found then an exception is raised. """

    if os.name == 'posix':
        bin_name = ['xmlsec1']
    elif os.name == 'nt':
        bin_name = ['xmlsec.exe', 'xmlsec1.exe']
    else:  # Default !?
        bin_name = ['xmlsec1']

    if paths:
        for bname in bin_name:
            for path in paths:
                fil = os.path.join(path, bname)
                try:
                    if os.lstat(fil):
                        return fil
                except OSError:
                    pass

    for path in os.environ['PATH'].split(os.pathsep):
        for bname in bin_name:
            fil = os.path.join(path, bname)
            try:
                if os.lstat(fil):
                    return fil
            except OSError:
                pass

    raise SigverError('Cannot find {binary}'.format(binary=bin_name))