Solve the programming task below in a Python markdown code block.
Write a function that removes every lone 9 that is inbetween 7s.

```python
seven_ate9('79712312') => '7712312'
seven_ate9('79797') => '777'
```

Input: String
Output: String
Also feel free to reuse/extend the following starter code:
```python
def seven_ate9(str_):
```