import ast


def define_lambda(name, args, body):
    """
    Construct AST lambda assignment with specified name, args and 
    body. Because lambdas are anonymous, we must assign them to some 
    variable in order to reference them. This variable is returned to 
    end-user.
    """
    return ast.Assign(
        targets = [
            ast.Name(
                id = name,
                ctx = ast.Store()
            )
        ],
        value = ast.Lambda(
            args = args,
            body = body
        )
    )