def METHOD_NAME(target):
    targetattr = TargetType(target.target_type).name
    opt_function = get_function(TargetOperator(target.opt))
    return lambda x: opt_function(x[targetattr], target.value)