code: def calculate(cls, byte_arr, crc=0):
          
          for byte in byte_iter(byte_arr):
              # Taken verbatim from FIT SDK docs
              tmp = cls.CRC_TABLE[crc & 0xF]
              crc = (crc >> 4) & 0x0FFF
              crc = crc ^ tmp ^ cls.CRC_TABLE[byte & 0xF]
  
              tmp = cls.CRC_TABLE[crc & 0xF]
              crc = (crc >> 4) & 0x0FFF
              crc = crc ^ tmp ^ cls.CRC_TABLE[(byte >> 4) & 0xF]
          return crc
docs: Compute CRC for input bytes.