code: def framesToFrameRange(frames, sort=True, zfill=0, compress=False):
          
          if compress:
              frames = unique(set(), frames)
          frames = list(frames)
          if not frames:
              return ''
          if len(frames) == 1:
              return pad(frames[0], zfill)
          if sort:
              frames.sort()
          return ','.join(FrameSet.framesToFrameRanges(frames, zfill))
docs: Converts an iterator of frames into a
          frame range string.
  
          Args:
              frames (collections.Iterable): sequence of frames to process
              sort (bool): sort the sequence before processing
              zfill (int): width for zero padding
              compress (bool): remove any duplicates before processing
  
          Returns:
              str: