code: def write_numeric(self, arr, name):
      arr = arr_to_2d(arr, self.oned_as)
      imagf = arr.dtype.kind == "c"
      try:
          P = np_to_mtypes[arr.dtype.str[1:]]
      except KeyError:
          if imagf:
              arr = arr.astype("c128")
          else:
              arr = arr.astype("f8")
          P = miDOUBLE
      self.write_header(
          name, arr.shape, P=P, T=mxFULL_CLASS, imagf=imagf
      )
      if imagf:
          self.write_bytes(arr.real)
          self.write_bytes(arr.imag)
      else:
          self.write_bytes(arr)
  
imports: import sys
  import warnings
  import numpy
  import scipy.sparse
  from .miobase import MatFileReader, docfiller, matdims, read_dtype, convert_dtypes, arr_to_chars, arr_dtype_number
  from .mio_utils import squeeze_element, chars_to_strings
  from functools import reduce
label_desc: Use image node_id 6 for calling the VarWriter4 obj's underlying member method code with example usage: obj.write_numeric(arr, name) without return types