In the example below, when I run `y_file.py`, I need `5` printed and `Hello` not printed.
How to stop the execution of an imported python script `x_file.py` without exiting the python altogether? `sys.exit()` seems to exit python altogether.

`x_file.py`

```
import sys
x = 5
if __name__ != '__main__':
  pass
  # stop executing x.py, but do not exit python
  # sys.exit() # this line exits python
print("Hello")

```

`y_file.py`

```
import x_file
print(x_file.x)

```