move this at the beginning of file and import like this:

```
from os import path
```