class_docstr: Parses compiler directives and converts them into AST annotations.
code: def _process_statement_directive(self, call_node, directive):
      if self.state[_LoopScope].statements_visited > 1:
          raise ValueError(
              '"%s" must be the first statement in the loop block'
              % (directive.__name__)
          )
      if self.state[_LoopScope].level < 2:
          raise ValueError(
              '"%s" must be used inside a statement'
              % directive.__name__
          )
      target = self.state[_LoopScope].ast_node
      node_anno = anno.getanno(target, anno.Basic.DIRECTIVES, {})
      node_anno[directive] = _map_args(call_node, directive)
      anno.setanno(target, anno.Basic.DIRECTIVES, node_anno)
      return call_node
  
imports: import inspect
  import gast
  from nvidia.dali._autograph.core import converter
  from nvidia.dali._autograph.lang import directives
  from nvidia.dali._autograph.pyct import anno
label_desc: Use image node_id 2 for calling the DirectivesTransformer obj's underlying member method code with example usage: obj._process_statement_directive(call_node, directive) and returns: call_node