code: def get_splitted_primary_before(self, offset):
          
          if offset == 0:
              return ('', '', 0)
          end = offset - 1
          word_start = self._find_atom_start(end)
          real_start = self._find_primary_start(end)
          if self.code[word_start:offset].strip() == '':
              word_start = end
          if self.code[end].isspace():
              word_start = end
          if self.code[real_start:word_start].strip() == '':
              real_start = word_start
          if real_start == word_start == end and not self._is_id_char(end):
              return ('', '', offset)
          if real_start == word_start:
              return ('', self.raw[word_start:offset], word_start)
          else:
              if self.code[end] == '.':
                  return (self.raw[real_start:end], '', offset)
              last_dot_position = word_start
              if self.code[word_start] != '.':
                  last_dot_position = \
                      self._find_last_non_space_char(word_start - 1)
              last_char_position = \
                  self._find_last_non_space_char(last_dot_position - 1)
              if self.code[word_start].isspace():
                  word_start = offset
              return (self.raw[real_start:last_char_position + 1],
                      self.raw[word_start:offset], word_start)
docs: returns expression, starting, starting_offset
  
          This function is used in `rope.codeassist.assist` function.