human
Here's a good function header given the following:
I wrote the below code

    def _fix_qos_specs(qos_specs):
        if qos_specs:
            qos_specs.pop('id', None)
            qos_specs.pop('name', None)
            qos_specs.update(qos_specs.pop('specs', {}))
    def _fix_encryption_specs(encryption):
        if encryption:
            encryption = dict(encryption)
            for param in ENCRYPTION_IGNORED_FIELDS:
                encryption.pop(param, None)
        return encryption
    def _dict_diff(dict1, dict2):
        res = {}
        equal = True
        if (dict1 is None):
            dict1 = {}
        if (dict2 is None):
            dict2 = {}
        for (k, v) in dict1.items():
            res[k] = (v, dict2.get(k))
            if ((k not in dict2) or (res[k][0] != res[k][1])):
                equal = False
        for (k, v) in dict2.items():
            res[k] = (dict1.get(k), v)
            if ((k not in dict1) or (res[k][0] != res[k][1])):
                equal = False
        return (res, equal)
    all_equal = True
    diff = {}
    vol_type_data = []
    for vol_type_id in (vol_type_id1, vol_type_id2):
        if (vol_type_id is None):
            specs = {'extra_specs': None, 'qos_specs': None, 'encryption': None}
        else:
            specs = {}
            vol_type = get_volume_type(context, vol_type_id)
            specs['extra_specs'] = vol_type.get('extra_specs')
            qos_specs = get_volume_type_qos_specs(vol_type_id)
            specs['qos_specs'] = qos_specs.get('qos_specs')
            _fix_qos_specs(specs['qos_specs'])
            specs['encryption'] = get_volume_type_encryption(context, vol_type_id)
            specs['encryption'] = _fix_encryption_specs(specs['encryption'])
        vol_type_data.append(specs)
    (diff['extra_specs'], equal) = _dict_diff(vol_type_data[0]['extra_specs'], vol_type_data[1]['extra_specs'])
    if (not equal):
        all_equal = False
    (diff['qos_specs'], equal) = _dict_diff(vol_type_data[0]['qos_specs'], vol_type_data[1]['qos_specs'])
    if (not equal):
        all_equal = False
   ...

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

def volume_types_diff(context, vol_type_id1, vol_type_id2):