@staticmethod
    def _get_extra_dict(response, mapping):
        extra = {}
        for attribute, values in mapping.items():
            transform_func = values["transform_func"]
            value = response.get(values["key_name"])

            extra[attribute] = transform_func(value) if value else None
        return extra
Extract attributes from the element based on rules provided in the
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/onapp.py/OnAppNodeDriver._get_extra_dict