code: def squeeze_bits(arr: numpy.ndarray) -> numpy.ndarray:
      
      assert arr.dtype.kind in ("i", "u")
      if arr.dtype.kind == "i":
          assert arr.min() >= 0
      mlbl = int(arr.max()).bit_length()
      if mlbl <= 8:
          dtype = numpy.uint8
      elif mlbl <= 16:
          dtype = numpy.uint16
      elif mlbl <= 32:
          dtype = numpy.uint32
      else:
          dtype = numpy.uint64
      return arr.astype(dtype)
docs: Return a copy of an integer numpy array with the minimum bitness.