def METHOD_NAME(requests):
    """Record and serialize GCP API call answers.
    Args:
        requests (dict): A dictionary to store a copy of all requests and
            responses in, before pickling.
    Returns:
        function: Decorator function.
    """
    def decorate(f):
        """Decorator function for the wrapper.
        Args:
            f(function): passes a function into the wrapper.
        Returns:
            function: Wrapped function.
        """
        @functools.wraps(f)
        def record_wrapper(self, request, *args, **kwargs):
            """Record and serialize GCP API call answers.
            Args:
                self (object): Self of the caller.
                request (HttpRequest): The HttpRequest object to execute.
                **args (list): Additional args to pass through to function.
                **kwargs (dict): Additional key word args to pass through to
                    function.
            Returns:
                object: The result from the wrapped function.
            Raises:
                HttpError: Raised by any fatal HTTP error when executing the
                    HttpRequest.
                Exception: Any exception raised by the wrapped function.
            """
            record_file = os.environ.get(RECORD_ENVIRONMENT_VAR, None)
            if not record_file:
                return f(self, request, *args, **kwargs)
            with open(record_file, 'wb') as outfile:
                pickler = pickle.Pickler(outfile)
                request_key = _key_from_request(request)
                results = requests.setdefault(
                    request_key, collections.deque())
                try:
                    result = f(self, request, *args, **kwargs)
                    obj = {
                        'exception_args': None,
                        'raised': False,
                        'request': request.to_json(),
                        'result': result,
                        'uri': request.uri}
                    results.append(obj)
                    return result
                except errors.HttpError as e:
                    # HttpError won't unpickle without all three arguments.
                    obj = {
                        'raised': True,
                        'request': request.to_json(),
                        'result': e.__class__,
                        'uri': request.uri,
                        'exception_args': (e.resp, e.content, e.uri)
                    }
                    results.append(obj)
                    raise
                except Exception as e:
                    LOGGER.exception(e)
                    obj = {
                        'raised': True,
                        'request': request.to_json(),
                        'result': e.__class__,
                        'uri': request.uri,
                        'exception_args': [str(e)]
                    }
                    results.append(obj)
                    raise
                finally:
                    LOGGER.debug('Recording key %s', request_key)
                    pickler.dump(requests)
                    outfile.flush()
        return record_wrapper
    return decorate