code: def to_header(self):
          
          ranges = []
          for begin, end in self.ranges:
              if end is None:
                  ranges.append("%s-" % begin if begin >= 0 else str(begin))
              else:
                  ranges.append("%s-%s" % (begin, end - 1))
          return "%s=%s" % (self.units, ",".join(ranges))
docs: Converts the object back into an HTTP header.