code: def parse_byte_range(byte_range):
      '''Returns the two numbers in 'bytes=123-456' or throws ValueError.
  
      The last number or both numbers may be None.
      '''
      if byte_range.strip() == '':
          return None, None
  
      m = BYTE_RANGE_RE.match(byte_range)
      if not m:
          raise ValueError('Invalid byte range %s' % byte_range)
  
      first, last = [x and int(x) for x in m.groups()]
      if last and last < first:
          raise ValueError('Invalid byte range %s' % byte_range)
      return first, lasf parse_byte_range(byte_range):
      '''Returns the two numbers in 'bytes=123-456' or throws ValueError.
  
      The last number or both numbers may be None.
      '''
      if byte_range.strip() == '':
          return None, None
  
      m = BYTE_RANGE_RE.match(byte_range)
      if not m:
          raise ValueError('Invalid byte range %s' % byte_range)
  
      first, last = [x and int(x) for x in m.groups()]
      if last and last < first:
          raise ValueError('Invalid byte range %s' % byte_range)
      return first, last
docs: Returns the two numbers in 'bytes=123-456' or throws ValueError.
  
      The last number or both numbers may be None.