def _process_COM_value(V):
    """
    
    >>> _process_COM_value(3)
    3
    >>> _process_COM_value((3, 3, 3))
    [3, 3, 3]
    >>> _process_COM_value((UntranslatableCOM, UntranslatableCOM))
    UntranslatableCOM
    >>> _process_COM_value((UntranslatableCOM, 3))
    [UntranslatableCOM, 3]
    >>> _process_COM_value((UntranslatableCOM, UnrecognizedCOM))
    [UntranslatableCOM, UnrecognizedCOM]
    
    """
    
    if V in [UntranslatableCOM, UnrecognizedCOM, None]:
        
        return V
    
    elif isinstance(
        V,
        (
            str,
            float,
            int,
            long,
            datetime.date,
            datetime.time,
            datetime.datetime,
            )):
        
        return V
        
    elif isinstance(V, unicode):
        
        try:
            return V.encode('latin-1')
        except UnicodeEncodeError:
            return V
        
    elif isinstance(V, (tuple, list)):
        L = map(_process_COM_value, V)
        if L == ([UntranslatableCOM] * len(L)):
            return UntranslatableCOM
        else:
            return L
        
    elif type(V).__name__ == 'time':
        
        d, t = ADO_PyTime_To_Datetime(V)
        if t == _time_zero:
            return d
        else:
            return datetime.datetime.combine(d, t)
        
    else:
        
        R = repr(V)
    
        if R == '<COMObject <unknown>>':
            
            return UntranslatableCOM
        
        elif re_read_write_buffer.match(R):
            
            return UntranslatableCOM
        
        else:
            
            return UnrecognizedCOM
            
            #for S in ['V', 'type(V)', 'str(V)', 'repr(V)', 'type(V).__name__']:
            #    print '%s: %r' % (S, eval(S))
            #
            #raise ValueError, V

    
    >>> _process_COM_value(3)
    3
    >>> _process_COM_value((3, 3, 3))
    [3, 3, 3]
    >>> _process_COM_value((UntranslatableCOM, UntranslatableCOM))
    UntranslatableCOM
    >>> _process_COM_value((UntranslatableCOM, 3))
    [UntranslatableCOM, 3]
    >>> _process_COM_value((UntranslatableCOM, UnrecognizedCOM))
    [UntranslatableCOM, UnrecognizedCOM]
    
    
recipes/Python/511451_Dump_all_Active_Directory_Informatiusing_LDAP/recipe-511451.py