code: def offset(self, position):
          
          if position > self.end or position < self.start:
              raise ValueError(
                  "Position %d outside valid range %d..%d of %s" % (
                      position, self.start, self.end, self))
          elif self.on_forward_strand:
              return position - self.start
          else:
              return self.end - position
docs: Offset of given position from stranded start of this locus.
  
          For example, if a Locus goes from 10..20 and is on the negative strand,
          then the offset of position 13 is 7, whereas if the Locus is on the
          positive strand, then the offset is 3.