original_docstring: 
      Order the slices span in ascending order.
      When we are slicing a pbcarray we might be rolling and padding the array
      so it's probably a good idea to make the array as small as possible
      early on.
  
      
docstring: Order the slices span in ascending order.
  When we are slicing a pbcarray we might be rolling and padding the array
  so it's probably a good idea to make the array as small as possible
  early on.
docstring_tokens: Order the slices span in ascending order . When we are slicing a pbcarray we might be rolling and padding the array so it ' s probably a good idea to make the array as small as possible early on .
code: def _order_slices(dim, slices):
      """
      Order the slices span in ascending order.
      When we are slicing a pbcarray we might be rolling and padding the array
      so it's probably a good idea to make the array as small as possible
      early on.
  
      """
      sizes = []
      for idim, sli in slices:
          step = sli.step or 1
          start = sli.start or (0 if step > 0 else shape_[idim])
          stop = sli.stop or (shape_[idim] if step > 0 else 0)
          size = abs((max(start, stop) - min(start, stop))//step)
          sizes.append(size)
  
      sizes, slices = zip(*sorted(zip(sizes, slices)))
  
      return slices
code_tokens: def _order_slices ( dim , slices ) : sizes = [ ] for idim , sli in slices : step = sli . step or 1 start = sli . start or ( 0 if step > 0 else shape_ [ idim ] ) stop = sli . stop or ( shape_ [ idim ] if step > 0 else 0 ) size = abs ( ( max ( start , stop ) - min ( start , stop ) ) // step ) sizes . append ( size ) sizes , slices = zip ( * sorted ( zip ( sizes , slices ) ) ) return slices
short_docstring: Order the slices span in ascending order.
short_docstring_tokens: Order the slices span in ascending order .
comment: """
      Order the slices span in ascending order.
      When we are slicing a pbcarray we might be rolling and padding the array
      so it's probably a good idea to make the array as small as possible
      early on.
  
      """