code: def quantize(
      self, tensor: torch.Tensor, allow_inplace: bool = False
  ) -> Tuple[np.ndarray, Tuple[np.ndarray, np.ndarray]]:
      try:
          # This runs actual import only on the 1st call, copies references after that
          from bitsandbytes.functional import quantize_blockwise
      except ImportError:
          raise ImportError(BNB_MISSING_MESSAGE)
  
      quantized, (absmax, codebook, *extra_params) = quantize_blockwise(
          tensor, blocksize=4096, nested=False
      )
      assert (
          tuple(extra_params) == self.EXTRA_PARAMS
      )  # blocksize, nested, dtype, offset, state2
      return quantized.numpy(), (absmax.numpy(), codebook.numpy())
  
imports: import math
  import os
  import warnings
  from abc import ABC, abstractmethod
  from concurrent.futures import ThreadPoolExecutor
  from typing import Tuple
  import numpy
  import torch
  from hivemind.compression.base import CompressionBase, CompressionInfo
  from hivemind.proto import runtime_pb2
label_desc: Use image node_id 1 for calling the BlockwiseQuantization obj's underlying member method code with example usage: obj.quantize(tensor, allow_inplace) and returns: quantized,  absmax,  codebook