code: def SlowAppendInt4ArrayToTensorProto(tensor_proto, proto_values):
      # The actual bit representation of int4 as a bit-field is
      # implementation-defined, so we need to explicitly cast each
      # value to an int for packing.
      x = np.asarray(
          proto_values, dtype=dtypes.int4.as_numpy_dtype
      ).astype(np.int8)
      tensor_proto.int_val.extend(x.tolist())
  
imports: import typing
  from typing import Protocol
  import numpy
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.python.client import pywrap_tf_session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.types import core
  from tensorflow.python.types import internal
  from tensorflow.python.util import compat
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 11 for calling a global function with example usage: SlowAppendInt4ArrayToTensorProto(tensor_proto, proto_values) without return types