I need to import a function x of file X from directory A to file Y of directory B but the the file X also imports function z of file Z from A directory itself. Directory A is inside directory C and directories B and C are at same level. I tried adding A to sys path and doing 'from X import x' but it threw no module found error and also I added C to path and did from A.X import x but same error.Y is able to import x from X but when X executes and reads import for Z it throws error.
Dir structure :
├───C
│ ├───A
│ │ ├───X
│ │ ├───Z
└───B
└───Y