<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_config_root(path=sys.argv[0]):
 """ Finds config root relative to the given file path """

    dirname = os.path.dirname(path)
    lastdirname = None

    while dirname != lastdirname:
        config_root = os.path.join(dirname, 'config')
        if os.path.exists(config_root):
            return config_root

        lastdirname, dirname = dirname, os.path.dirname(dirname)