'Package a CoreFoundation object in a Python wrapper.
Args:
obj: The CoreFoundation object.
Returns:
One of CFBoolean, CFNumber, CFString, CFDictionary, CFArray.
Raises:
TypeError: If the type is not supported.'

def WrapCFTypeInPython(self, obj):

    obj_type = self.dll.CFGetTypeID(obj)
    if (obj_type == self.dll.CFBooleanGetTypeID()):
        return CFBoolean(obj)
    elif (obj_type == self.dll.CFNumberGetTypeID()):
        return CFNumber(obj)
    elif (obj_type == self.dll.CFStringGetTypeID()):
        return CFString(obj)
    elif (obj_type == self.dll.CFDictionaryGetTypeID()):
        return CFDictionary(obj)
    elif (obj_type == self.dll.CFArrayGetTypeID()):
        return CFArray(obj)
    else:
        raise TypeError('Unknown    type    for    object:    {0}'.format(obj))
