code: def pop(self, idx=-1):
          
          # pylint: disable=arguments-differ
          if not self._len:
              raise IndexError('pop index out of range')
  
          _lists = self._lists
  
          if idx == 0:
              val = _lists[0][0]
              self._delete(0, 0)
              return val
  
          if idx == -1:
              pos = len(_lists) - 1
              loc = len(_lists[pos]) - 1
              val = _lists[pos][loc]
              self._delete(pos, loc)
              return val
  
          if 0 <= idx < len(_lists[0]):
              val = _lists[0][idx]
              self._delete(0, idx)
              return val
  
          len_last = len(_lists[-1])
  
          if -len_last < idx < 0:
              pos = len(_lists) - 1
              loc = len_last + idx
              val = _lists[pos][loc]
              self._delete(pos, loc)
              return val
  
          pos, idx = self._pos(idx)
          val = _lists[pos][idx]
          self._delete(pos, idx)
  
          return val
docs: Remove and return item at *idx* (default last).  Raises IndexError if
          list is empty or index is out of range.  Negative indices are supported,
          as for slice indices.