Hi All, I have 2 files “utils.py” and “trainer.py”. The trainer.py has a class “Trainer” with a function “tnr” defined under the class as shown in the image below. I want to access the highlighted variables “edge_logits” and “nodes_logits” in the last line of the trainer.py and use them in the “reconstruction_scores” function in the utils.py file but I have tried all possible options but getting error. As can be seen, I have already imported utils in the trainer.py file and so when I import trainer in the utils.py, it will throw a error as a result of circular imports. Any ideas to help access the “nodes_logits” and “edges_logits” from the trainer.py and use them in the “reconstruction_scores” function in the utils.py are welcomed. Below are the images of the trainer.py and utils.py.
trainer.py

utils.py