def _check_submodule_status(root, submodules):
if hasattr(sys, "<STR_LIT>"):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if not os.path.exists(os.path.join(root, '<STR_LIT>')):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>for submodule in submodules:<EOL><INDENT>if not os.path.exists(submodule):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT><DEDENT>if sys.platform == '<STR_LIT:win32>' and sys.version_info[<NUM_LIT:0>] < <NUM_LIT:3>and not isinstance(root, bytes):<EOL><INDENT>root = root.encode(sys.getfilesystemencoding() or '<STR_LIT:ascii>')<EOL><DEDENT>proc = subprocess.Popen('<STR_LIT>',<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE,<EOL>shell=True,<EOL>cwd=root)<EOL>status, _ = proc.communicate()<EOL>status = status.decode("<STR_LIT:ascii>", "<STR_LIT:replace>")<EOL>for line in status.splitlines():<EOL><INDENT>if line.startswith('<STR_LIT:->'):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>elif line.startswith('<STR_LIT:+>'):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT><DEDENT>return '<STR_LIT>'<EOL>
check submodule status
    Has three return values:
    'missing' - submodules are absent
    'unclean' - submodules have unstaged changes
    'clean' - all submodules are up to date