human
I wrote the below code

    def _consumed(name):
        return (usages[name]['reserved'] + usages[name]['in_use'])
    overs = over_quota_exception.kwargs['overs']
    usages = over_quota_exception.kwargs['usages']
    quotas = over_quota_exception.kwargs['quotas']
    invalid_overs = []
    for over in overs:
        if ('gigabytes' in over):
            msg = 'Quota    exceeded    for    %(s_pid)s,    tried    to    create    %(s_size)dG    %(s_resource)s    (%(d_consumed)dG    of    %(d_quota)dG    already    consumed).'
            LOG.warning(msg, {'s_pid': context.project_id, 's_size': size, 's_resource': resource[:(-1)], 'd_consumed': _consumed(over), 'd_quota': quotas[over]})
            if (resource == 'backups'):
                exc = exception.VolumeBackupSizeExceedsAvailableQuota
            else:
                exc = exception.VolumeSizeExceedsAvailableQuota
            raise exc(name=over, requested=size, consumed=_consumed(over), quota=quotas[over])
        if ((resource in OVER_QUOTA_RESOURCE_EXCEPTIONS.keys()) and (resource in over)):
            msg = 'Quota    exceeded    for    %(s_pid)s,    tried    to    create    %(s_resource)s    (%(d_consumed)d    %(s_resource)ss    already    consumed).'
            LOG.warning(msg, {'s_pid': context.project_id, 'd_consumed': _consumed(over), 's_resource': resource[:(-1)]})
            raise OVER_QUOTA_RESOURCE_EXCEPTIONS[resource](allowed=quotas[over], name=over)
        invalid_overs.append(over)
    if invalid_overs:
        raise exception.UnexpectedOverQuota(name=',    '.join(invalid_overs))

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def process_reserve_over_quota(context, over_quota_exception, resource, size=None):