code: def test_local_target(self):
      def f():
          l = []
          string_var = 0
          directives.set_element_type(l, "a", string_var)
  
      _, node, _ = self.transform(
          f, directives_converter, include_ast=True
      )
  
      (def_,) = anno.getanno(
          node.body[0].targets[0], anno.Static.DEFINITIONS
      )
      d = def_.directives[directives.set_element_type]
      self.assertEqual(d["dtype"].value, "a")
      self.assertEqual(d["shape"].id, "string_var")
  
file_path: tensorflow-upstream/tensorflow/python/autograph/converters/directives_test.py
imports: from tensorflow.python.autograph.converters import directives
  from tensorflow.python.autograph.core import converter_testing
  from tensorflow.python.autograph.lang import directives
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the DirectivesTest obj's underlying member method code with example usage: obj.test_local_target() without return types