@classmethod
def _convert_path_to_bare_tail_path(cls, path):
    """
        Strips the index (if present) from the last path element (i.e. ensuring
        that it has a "bare tail").

        Parameters
        ----------
        path : unicode
            The path to be converted (may contain indices).

        Returns
        -------
        bare_tail_path : unicode
            Similar as path but the last path element is guaranteed to be without index.

        Examples
        --------
        >>> JSONAdaptor._convert_path_to_bare_tail_path('A/B/C')
        'A/B/C'
        >>> JSONAdaptor._convert_path_to_bare_tail_path('A[0]/B[1]/C[2]')
        'A[0]/B[1]/C'
        """
    if len(cls.split_path(path)) > 1:
        head = cls.join_paths(*cls.split_path(path)[:-1])
        tail = cls._parse_name_from_element_identifier(cls.split_path(path)[-1]
            )
        return cls.join_paths(head, tail)
    else:
        return cls._parse_name_from_element_identifier(path)
