def _maybe_replace_path(self, match):
path = match.group(<NUM_LIT:0>)<EOL>if self._should_replace(path):<EOL><INDENT>return self._replace_path(path)<EOL><DEDENT>else:<EOL><INDENT>return path<EOL><DEDENT>
Regex replacement method that will sub paths when needed