I'm using Python to extract some data from the Google Analytics Core Reporting API. I've managed to use functions to make different calls to the API (below are just two examples) but I'm wondering how can I refactor this to make it even shorter? There's quite a lot of duplicate code still.I'm using Python to extract some data from the