code: def bits(
      tensor: tf.Tensor,
      bitsize: Optional[int] = None,
  ) -> list:
      """Extract bits of values in `tensor`, returning a list of tensors."""
  
      with tf.name_scope("bits"):
          bitsize = bitsize or (tensor.dtype.size * 8)
          the_bits = [
              tf.bitwise.bitwise_and(
                  tf.bitwise.right_shift(tensor, i), 1
              )
              for i in range(bitsize)
          ]
          return the_bits
  
file_path: tf-encrypted/tf_encrypted/tensor/shared.py
imports: import math
  from typing import Optional
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: bits(tensor, bitsize) and returns: the_bits