as part of a game I'm making I decided to make an importable/executable file to shorten the code and I was wondering...

```
def view(N,W,E,S):
if info_dict["direction"] == "north":
if N != 1:
pic = fwall
wall = "yes"
if N == 1:
if W != 1 and E != 1:
pic = fhall
wall = "no"
if W == 1 and E != 1:
pic = flhall
wall = "no"
if W != 1 and E == 1:
pic = frhall
wall = "no"
if W == 1 and E == 1:
pic = frlhall
wall = "no"
if info_dict["direction"] == "west":
if W != 1:
pic = fwall
wall = "yes"
if W == 1:
if S != 1 and N != 1:
pic = fhall
wall = "no"
if S == 1 and N != 1:
pic = flhall
wall = "no"
if S != 1 and N == 1:
pic = frhall
wall = "no"
if S == 1 and N == 1:
pic = frlhall
wall = "no"
if info_dict["direction"] == "south":
if S != 1:
pic = fwall
wall = "yes"
if S == 1:
if E != 1 and W != 1:
pic = fhall
wall = "no"
if E == 1 and W != 1:
pic = flhall
wall = "no"
if E != 1 and W == 1:
pic = frhall
wall = "no"
if E == 1 and W == 1:
pic = frlhall
wall = "no"
if info_dict["direction"] == "east":
if E != 1:
pic = fwall
wall = "yes"
if E == 1:
if N != 1 and S != 1:
pic = fhall
wall = "no"
if N == 1 and S != 1:
pic = flhall
wall = "no"
if N != 1 and S == 1:
pic = frhall
wall = "no"
if N == 1 and S == 1:
pic = frlhall
wall = "no"
```

would this be usable and if so how would I do so?