code: def _remove_duplicates(self, items):
          
          result = []
          for i in items:
              if i not in result:
                  result.append(i)
          return result
docs: Remove duplicates, while keeping the order.
          (Sometimes we have duplicates, because the there several matches of the
          same grammar, each yielding similar completions.)