code: def random_flip(sequence,rnum=None):
    
    randin = rnum
    if not randin: randin = RandomSource()
    if randin.random() < 0.5:
      return rc(sequence)
    return sequence
docs: Flip a sequence direction with 0.5 probability