docstr: Spilt the list at position specified by index. Returns a tuple containing the
  list up until index and the list after the index. Runs in O(index).
  
  >>> plist([1, 2, 3, 4]).split(2)
  (plist([1, 2]), plist([3, 4]))
docstr_tok: ["Spilt","the","list","at","position","specified","by","index",".","Returns","a","tuple","containing","the","list","up","until","index","and","the","list","after","the","index",".","Runs","in","O","(","index",")",".",">",">",">","plist","(","[","1",",","2",",","3",",","4","]",")",".split","(","2",")","(","plist","(","[","1",",","2","]",")",",","plist","(","[","3",",","4","]",")",")"]
code: def split(self, index):
      """
      Spilt the list at position specified by index. Returns a tuple containing the
      list up until index and the list after the index. Runs in O(index).
  
      >>> plist([1, 2, 3, 4]).split(2)
      (plist([1, 2]), plist([3, 4]))
      """
      lb = _PListBuilder()
      right_list = self
      i = 0
      while right_list and i < index:
          lb.append_elem(right_list.first)
          right_list = right_list.rest
          i += 1
  
      if not right_list:
          # Just a small optimization in the cases where no split occurred
          return self, _EMPTY_PLIST
  
      return lb.build(), right_list
  
imports: from ._compat import Sequence, Hashable
  from numbers import Integral
  from functools import reduce
label_desc: Use image node_id 7 for calling the _PListBase obj's underlying member method code with example usage: obj.split(index) and returns: lb,  right_list, self,  _EMPTY_PLIST