def METHOD_NAME(mode, base_object):
    if mode == 'Solid':
        if isinstance(base_object, Part.Solid):
            shape = base_object.OuterShell
        else:
            shape = base_object
    elif mode == 'Face':
        shape = base_object.face
    else:
        shape = base_object.edge
    return shape