Get the :class:`language_tags.Subtag.Subtag` objects of the tag.

        :return: list of :class:`language_tags.Subtag.Subtag` objects that are part of the tag.
            The return list can be empty.

def subtags(self):
        """
        Get the :class:`language_tags.Subtag.Subtag` objects of the tag.

        :return: list of :class:`language_tags.Subtag.Subtag` objects that are part of the tag.
            The return list can be empty.
        """
        data = self.data
        subtags = []

        # if tag is grandfathered return no subtags
        if 'record' in data and self.data['record']['Type'] == 'grandfathered':
            return subtags

        codes = data['tag'].split('-')
        # Try and find the language tag.
        for i, code in enumerate(codes):

            # Singletons and anything after are unhandled.
            if len(code) == 1:
                #Stop the loop (stop processing after a singleton).
                break

            # Check for non-existent tag.
            if code not in index:
                continue
            types = index[code]

            # Language subtags may only appear at the beginning of the tag, otherwise the subtag type is indeterminate.
            if 'language' in types and i == 0:
                subtags.append(Subtag(code, 'language'))
                continue

            if len(code) == 2:
                # Should be a region
                if 'region' in types:
                    subtags.append(Subtag(code, 'region'))
                # Error case: language subtag in the wrong place.
                elif 'language' in types:
                    subtags.append(Subtag(code, 'language'))

            elif len(code) == 3:
                # Could be a numeric region code e.g. '001' for 'World'.
                if 'region' in types:
                    subtags.append(Subtag(code, 'region'))
                elif 'extlang' in types:
                    subtags.append(Subtag(code, 'extlang'))
                # Error case: language subtag in the wrong place.
                elif 'language' in types:
                    subtags.append(Subtag(code, 'language'))

            elif len(code) == 4:
                # Could be a numeric variant
                if 'variant' in types:
                    subtags.append(Subtag(code, 'variant'))
                elif 'script' in types:
                    subtags.append(Subtag(code, 'script'))

            else:
                # Should be a variant
                if 'variant' in types:
                    subtags.append(Subtag(code, 'variant'))

        return subtags