def METHOD_NAME(item):
    lookup = (
        get_unpatched_class
        if isinstance(item, type)
        else get_unpatched_function
        if isinstance(item, types.FunctionType)
        else lambda item: None
    )
    return lookup(item)