code: def safe_range(*args):
      
      rng = range(*args)
      if len(rng) > MAX_RANGE:
          raise OverflowError('range too big, maximum size for range is %d' %
                              MAX_RANGE)
      return rng
docs: A range that can't generate ranges with a length of more than
      MAX_RANGE items.