<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_singularity_version():
    '''get the singularity client version. Useful in the case that functionality
       has changed, etc. Can be "hacked" if needed by exporting 
       SPYTHON_SINGULARITY_VERSION, which is checked before checking on the
       command line.
    '''
    version = os.environ.get('SPYTHON_SINGULARITY_VERSION', "")
    if version == "":
        try:
            version = run_command(["singularity", '--version'], quiet=True)
        except: # FileNotFoundError
            return version

        if version['return_code'] == 0:
            if len(version['message']) > 0:
                version = version['message'][0].strip('\n')

    return version