Solve the programming task below in a Python markdown code block.
ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but **exactly** 4 digits or exactly 6 digits. 

If the function is passed a valid PIN string, return `true`, else return `false`.

## Examples 
```
"1234"   -->  true
"12345"  -->  false
"a234"   -->  false
```
Also feel free to reuse/extend the following starter code:
```python
def validate_pin(pin):
```