def METHOD_NAME(self, obj):
    def _use_name_instead_id_as_key_in_custom_attributes_values(custom_attributes, values):
        ret = {}
        for attr in custom_attributes:
            value = values.get(str(attr["id"]), None)
            if value is not None:
                ret[attr["name"]] = value
        return ret
    try:
        values = obj.custom_attributes_values.attributes_values
        custom_attributes = self.custom_attributes_queryset(obj.project)
        return _use_name_instead_id_as_key_in_custom_attributes_values(custom_attributes, values)
    except ObjectDoesNotExist:
        return None