code: def interfeatures(self, features, new_featuretype=None,
                        merge_attributes=True, dialect=None,
                        attribute_func=None, update_attributes=None):
          for i, f in enumerate(features):
              if i == 0:
                  interfeature_start = f.stop
                  last_feature = f
                  continue
              interfeature_stop = f.start
              if new_featuretype is None:
                  new_featuretype = 'inter_%s_%s' % (
                      last_feature.featuretype, f.featuretype)
              if last_feature.strand != f.strand:
                  new_strand = '.'
              else:
                  new_strand = f.strand
              if last_feature.chrom != f.chrom:
                  last_feature = f
                  continue
              strand = new_strand
              chrom = last_feature.chrom
              interfeature_start += 1
              interfeature_stop -= 1
              if merge_attributes:
                  new_attributes = helpers.merge_attributes(
                      last_feature.attributes, f.attributes)
              else:
                  new_attributes = {}
              if update_attributes:
                  new_attributes.update(update_attributes)
              new_bin = bins.bins(
                  interfeature_start, interfeature_stop, one=True)
              _id = None
              fields = dict(
                  seqid=chrom,
                  source='gffutils_derived',
                  featuretype=new_featuretype,
                  start=interfeature_start,
                  end=interfeature_stop,
                  score='.',
                  strand=strand,
                  frame='.',
                  attributes=new_attributes,
                  bin=new_bin)
              if dialect is None:
                  try:
                      dialect = self.dialect
                  except AttributeError:
                      dialect = None
              yield self._feature_returner(**fields)
              interfeature_start = f.stop