class_docstr: Code emitter class.
class_docstr_tok: ["Code","emitter","class","."]
docstr: Emits buffer initialization code for activation tensors.
docstr_tok: ["Emits","buffer","initialization","code","for","activation","tensors","."]
code: def _emit_activation_init(self, name, out_c):
      """Emits buffer initialization code for activation tensors."""
  
      out_c.write(
          textwrap.dedent(
              f"""
          // {DBAR}
          //   {name}_configure_activations
          // {DBAR}
          AI_STATIC AI_INLINE
          ai_status {name}_configure_activations (
            const ai_ptr activations
          )
          {{
            if (activations == NULL) {{
              TVMAPISetLastError (\"Non-null activations arena is required for this model.\");
              return AI_STATUS_ERROR;
            }}
          """
          )
      )
  
      # Allocate inputs with the static model
      if self.inputs_static:
          for dl_tensor_name in self._input_data:
              tensor = self._input_data[dl_tensor_name]
              self._emit_tensor_activation(
                  dl_tensor_name, tensor, out_c
              )
  
      # Prepare activation buffers
      for dl_tensor_name in self._activations:
          tensor = self._activations[dl_tensor_name]
          self._emit_tensor_activation(dl_tensor_name, tensor, out_c)
  
      # Allocate outputs with the static model
      if self.outputs_static:
          for dl_tensor_name in self._output_data:
              tensor = self._output_data[dl_tensor_name]
              self._emit_tensor_activation(
                  dl_tensor_name, tensor, out_c
              )
  
      out_c.write(
          textwrap.dedent(
              f"""
            return AI_STATUS_OK;
          }}
          """
          )
      )
  
imports: import contextlib
  import json
  import os
  import re
  import shutil
  import tarfile
  import textwrap
  from datetime import datetime
  import numpy
  import tvm
  from tvm.contrib import utils
label_desc: Use image node_id 20 for calling the CodeEmitter obj's underlying member method code with example usage: obj._emit_activation_init(name, out_c) without return types