code: def test_replace_as_expression_restrictions(self):
      template = """
        foo(a)
        bar(b)
      """
      with self.assertRaises(ValueError):
          templates.replace_as_expression(template)
  
imports: import types
  from absl.testing import parameterized
  import gast
  from tensorflow.python.autograph.pyct import loader
  from tensorflow.python.autograph.pyct import parser
  from tensorflow.python.autograph.pyct import qual_names
  from tensorflow.python.autograph.pyct import templates
  from tensorflow.python.platform import test
label_desc: Use image node_id 17 for calling the TemplatesTest obj's underlying member method code with example usage: obj.test_replace_as_expression_restrictions() without return types