code: def _big_endian_int(bits: np.ndarray) -> int:
      
      result = 0
      for e in bits:
          result <<= 1
          if e:
              result |= 1
      return result
docs: Returns the big-endian integer specified by the given bits.
  
      For example, [True, False, False, True, False] becomes binary 10010 which
      is 18 in decimal.
  
      Args:
          bits: Descending bits of the integer, with the 1s bit at the end.
  
      Returns:
          The integer.