Invokes an Excel Function

def invoke_function(self, function_name, **function_params):
        """ Invokes an Excel Function """
        url = self.build_url(self._endpoints.get('function').format(function_name))
        response = self.session.post(url, data=function_params)
        if not response:
            return None
        data = response.json()

        error = data.get('error')
        if error is None:
            return data.get('value')
        else:
            raise FunctionException(error)