code: def _incorporate_delins(self):
          
          seq, cds_start, cds_stop, start, end = self._setup_incorporate()
  
          ref = self._var_c.posedit.edit.ref
          alt = self._var_c.posedit.edit.alt
          ref_length = end - start if ref is not None else 0    # can't just get from ref since ref isn't always known
          alt_length = len(
              self._var_c.posedit.edit.alt) if self._var_c.posedit.edit.alt is not None else 0
          net_base_change = alt_length - ref_length
          cds_stop += net_base_change
  
          # incorporate the variant into the sequence (depending on the type)
          is_substitution = False
          if ref is not None and alt is not None:    # delins or SNP
              seq[start:end] = list(alt)
              if len(ref) == 1 and len(alt) == 1:
                  is_substitution = True
          elif ref is not None:    # deletion
              del seq[start:end]
          else:    # insertion
              seq[start + 1:start + 1] = list(alt)    # insertion in list before python list index
  
          if DBG:
              print("net base change: {}".format(net_base_change))
          is_frameshift = net_base_change % 3 != 0
          # use max of mod 3 value and 1 (in event that indel starts in the 5'utr range)
          variant_start_aa = max(int(math.ceil((self._var_c.posedit.pos.start.base) / 3.0)), 1)
  
          alt_data = AltTranscriptData(
              seq,
              cds_start,
              cds_stop,
              is_frameshift,
              variant_start_aa,
              self._transcript_data.protein_accession,
              is_substitution=is_substitution,
              is_ambiguous=self._ref_has_multiple_stops)
          return alt_data
docs: Incorporate delins