<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_url_scheme_regexes():
 """ Get configured mercurial schemes and convert them to regexes Returns: tuple: (scheme_name, scheme_value, compiled scheme_regex) """

        output = sh("hg showconfig | grep '^schemes.'", shell=True).split('\n')
        log.debug(output)
        schemes = (
            l.split('.', 1)[1].split('=') for l in output if '=' in l)
        regexes = sorted(
            ((k, v, re.compile(v.replace('{1}', '(.*)')+'(.*)'))
                for k, v in schemes),
            key=lambda x: (len(x[0]), x),
            reverse=True)
        return regexes