def replace_slices(index):
 if isinstance(index, hashable_list):
  return list(index)
 elif isinstance(index, _slice):
  return index.as_slice()
 elif isinstance(index, tuple):
  return tuple(map(replace_slices, index))
 return index

def replace_slices ( index ) : if isinstance ( index , hashable_list ) : return list ( index ) elif isinstance ( index , _slice ) : return index . as_slice ( ) elif isinstance ( index , tuple ) : return tuple ( map ( replace_slices , index ) ) return index
takes input from slice expression and returns either a list .