docstr: Convert tensor into a pair of (indices, codebook)
docstr_tok: ["Convert","tensor","into","a","pair","of","(","indices",",","codebook",")"]
code: def quantize(
      self, tensor: torch.Tensor, allow_inplace: bool = False
  ) -> Tuple[np.ndarray, np.ndarray]:
      """Convert tensor into a pair of (indices, codebook)"""
      ...
  
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 Quantization obj's underlying member method code with example usage: obj.quantize(tensor, allow_inplace) without return types