class_docstr: Code emitter class.
class_docstr_tok: ["Code","emitter","class","."]
docstr: Emits the tensor instantiation code.
docstr_tok: ["Emits","the","tensor","instantiation","code","."]
code: def _emit_tensor_init(self, dl_tensor_name, tensor, out_c):
      """Emits the tensor instantiation code."""
  
      dltype = tensor["dltype"]
      dims = tensor["dims"]
      strides = tensor["strides"]
      byte_offset = tensor["byte_offset"]
      dtype = _get_type_data(dltype)
      ndim = len(dims)
      shape = str(dims)
      self._emit_tensor_shape(
          dl_tensor_name, ndim, shape, strides, out_c
      )
  
      # Quantization
      quant_name = self._emit_tensor_quant(dl_tensor_name, out_c)
  
      # Contents
      #
      # TODO: use the 'storage_id':
      #   "    .ctx = {{ {} }}, \n".format(str(storage_id)[1:-1])
      out_c.write(
          textwrap.dedent(
              f"""
          AI_ALIGNED({self.DATA_ALIGNMENT_BYTES}) AI_STATIC ai_tensor {dl_tensor_name} = {{
            .dltensor = {{
              .data = (ai_ptr)(NULL),
              .device = {{kDLCPU,0}},
              .ndim = {ndim},
              .dtype = {{{dtype}}},
              .shape = {dl_tensor_name}_shape,
              .strides = {dl_tensor_name}_strides,
              .byte_offset = {byte_offset}
            }},
          """
          )
      )
  
      # Figure out quantization, if exists
      if quant_name is not None:
          out_c.write(f"  .quant = &{quant_name} \n")
      else:
          out_c.write(f"  .quant = NULL \n")
      out_c.write(f"}}; \n")
  
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 15 for calling the CodeEmitter obj's underlying member method code with example usage: obj._emit_tensor_init(dl_tensor_name, tensor, out_c) without return types