'If a key does not directly map, this method derives the right value.
Some types are complex, in that the flavor may have one key that maps
to several different attributes in the lpar builder.  This method
handles the complex types.
:param key: The flavor\'s key.
:param attrs: The attribute map to put the value into.
:param flavor: The Nova instance flavor.
:return: The value to put in for the key.'

def _build_complex_type(self, key, attrs, flavor):

    if (key == self._PVM_UNCAPPED):
        attrs[lpar_bldr.SHARING_MODE] = (pvm_bp.SharingMode.UNCAPPED if stru.bool_from_string(flavor.extra_specs[key], strict=True) else pvm_bp.SharingMode.CAPPED)
    elif (key == self._PVM_DED_SHAR_MODE):
        shr_mode_key = flavor.extra_specs[key]
        mode = self._DED_SHARING_MODES_MAP.get(shr_mode_key)
        if (mode is None):
            raise exc.InvalidParameterValue(err=(_("Invalid    dedicated    sharing    mode    '%s'!") % shr_mode_key))
        attrs[lpar_bldr.SHARING_MODE] = mode
    elif (key == self._PVM_SHAR_PROC_POOL):
        pool_name = flavor.extra_specs[key]
        attrs[lpar_bldr.SPP] = self._spp_pool_id(pool_name)
    elif (key == self._PVM_PROC_COMPAT):
        attrs[lpar_bldr.PROC_COMPAT] = re.sub('\\+', '_Plus', flavor.extra_specs[key])
    elif (key == self._PVM_SRR_CAPABILITY):
        attrs[lpar_bldr.SRR_CAPABLE] = stru.bool_from_string(flavor.extra_specs[key], strict=True)
    else:
        raise KeyError((_("Unhandled    PowerVM    key    '%s'!        Please    report    this    bug.") % key))
