def _privateAttrMap(obj, ret=0):
    """clone obj._attrMap if required"""
    A = obj._attrMap
    oA = getattr(obj.__class__, '_attrMap', None)
    if ret:
        if oA is A:
            return A.clone(), oA
        else:
            return A, None
    elif oA is A:
        obj._attrMap = A.clone()
