def test_entity_to_graph_lambda(self):
    b = 2
    f = (lambda x: ((b * x) if (x > 0) else (- x)))
    program_ctx = self._simple_program_ctx()
    (nodes, name, ns) = conversion.entity_to_graph(f, program_ctx, None, None)
    (fn_node, _) = nodes
    self.assertIsInstance(fn_node, gast.Assign)
    self.assertIsInstance(fn_node.value, gast.Lambda)
    self.assertEqual('tf__lambda', name)
    self.assertIs(ns['b'], b)
def test_entity_to_graph_lambda(self):
    b = 2
    f = (lambda x: ((b * x) if (x > 0) else (- x)))
    program_ctx = self._simple_program_ctx()
    (nodes, name, ns) = conversion.entity_to_graph(f, program_ctx, None, None)
    (fn_node, _) = nodes
    self.assertIsInstance(fn_node, gast.Assign)
    self.assertIsInstance(fn_node.value, gast.Lambda)
    self.assertEqual('tf__lambda', name)
    self.assertIs(ns['b'], b)