code: def write_reference(self, ref_index):
          
          self._writeStruct(
              ">BL", 1, (self.TC_REFERENCE, ref_index + self.BASE_REFERENCE_IDX)
          )
docs: Writes a reference
          :param ref_index: Local index (0-based) to the reference