I have:
from pathlib import Path if some_condition: path1 = Path(r\'path/to/file.py\') else: path1 = Path(r\'path/to/other_file.py\')