So there are a few way to write this that might be better, one might be:
```py
if method == 'GET':
    result = urlfetch.fetch(url=url)
else:
    result = urlfetch.fetch(url=url, payload=data, method=method)
```
There are some other ways to write this too.