'Check that the tokens in the UnwrappedLines have the expected subtypes.
Args:
uwlines: list of UnwrappedLine.
list_of_expected: list of (name, subtype) pairs. Non-semantic tokens are
filtered out from the expected values.'

def _CheckFormatTokenSubtypes(self, uwlines, list_of_expected):

    actual = []
    for uwl in uwlines:
        filtered_values = [(ft.value, ft.subtypes) for ft in uwl.tokens if (ft.name not in pytree_utils.NONSEMANTIC_TOKENS)]
        if filtered_values:
            actual.append(filtered_values)
    self.assertEqual(list_of_expected, actual)
