original_docstring: From the indices 0:max_ix+1, remove the individual
      index values in ixs.
      Returns the remaining ranges of indices and singletons.
      
docstring: From the indices 0:max_ix+1, remove the individual
  index values in ixs.
  Returns the remaining ranges of indices and singletons.
docstring_tokens: From the indices 0 : max_ix + 1 remove the individual index values in ixs . Returns the remaining ranges of indices and singletons .
code: def remove_indices_from_range(ixs, max_ix):
      """From the indices 0:max_ix+1, remove the individual
      index values in ixs.
      Returns the remaining ranges of indices and singletons.
      """
      ranges = []
      i0 = 0
      for ix in ixs:
          i1 = ix - 1
          if i1 < i0:
              i0 = ix + 1
          elif i1 == i0:
              ranges.append([i0])
              i0 = ix + 1
          else:
              ranges.append([i0,i1+1])
              i0 = ix + 1
      if i0 < max_ix:
          ranges.append([i0, max_ix+1])
      elif i0 == max_ix:
          ranges.append([i0])
      return ranges
code_tokens: def remove_indices_from_range ( ixs , max_ix ) : ranges = [ ] i0 = 0 for ix in ixs : i1 = ix - 1 if i1 < i0 : i0 = ix + 1 elif i1 == i0 : ranges . append ( [ i0 ] ) i0 = ix + 1 else : ranges . append ( [ i0 , i1 + 1 ] ) i0 = ix + 1 if i0 < max_ix : ranges . append ( [ i0 , max_ix + 1 ] ) elif i0 == max_ix : ranges . append ( [ i0 ] ) return ranges
short_docstring: From the indices 0:max_ix+1, remove the individual
  index values in ixs.
short_docstring_tokens: From the indices 0 : max_ix + 1 remove the individual index values in ixs .
comment: """From the indices 0:max_ix+1, remove the individual
      index values in ixs.
      Returns the remaining ranges of indices and singletons.
      """