def METHOD_NAME(self, ch: str) -> int:
    """Return the underlining level associated with ch."""
    assert ch in underlines, repr(ch)
    d = self.rst_seen
    if ch in d:
        return d.get(ch)
    self.rst_level += 1
    d[ch] = self.rst_level
    return self.rst_level