code: def expand_block(self, feat):
          
          chrom_end = self._ref_sizes.get(feat.chrom)
          if chrom_end:
              if feat.start < self._end_buffer:
                  feat.start = 0
              if feat.stop >= chrom_end - self._end_buffer:
                  feat.stop = chrom_end
          return feat
docs: Expand any blocks which are near the start or end of a contig.