def unwrap(s, node_indent):
    """Group lines of a docstring to blocks.

    For now, only groups markdown list sections.

    A block designates a list of consequtive lines that all start at the same
    indentation level.

    The lines of the docstring are iterated top to bottom. Each line is added to
    `block_list` until a line is encountered that breaks sufficiently with the previous
    line to be deemed to be the start of a new block. At that point, all lines
    currently
    in `block_list` are stripped and joined to a single line, which is added to
    `unwrap_list`.

    Some of the block breaks are easy to determine. E.g., a line that starts with "- "
    is the start of a new markdown style list item, so is always the start of a new
    block. But then there are things like this, which is a single block:

    - An example list with a second line

    And this, which is 3 single line blocks (due to the different indentation levels):

    Args:
      jwt_bu64: bytes
        JWT, encoded using a a URL safe flavor of Base64.

    """

    def get_indent():
        if line_str.startswith('"""'):
            return node_indent
        return len(re.match(r"^( *)", line_str).group(1))

    def finish_block():
        if block_list:
            unwrap_list.append(
                (block_indent, (" ".join([v.strip() for v in block_list])).strip())
            )
            block_list.clear()

    unwrap_list = []

    block_indent = None
    block_list = []

    for line_str in s.splitlines():
        line_str = line_str.rstrip()
        line_indent = get_indent()

        # A new block has been started. Record the indent of the first line in that
        # block to use as the indent for all the lines that will be put in this block.
        if not block_list:
            block_indent = line_indent

        # A blank line always starts a new block.
        if line_str == "":
            finish_block()

        # Indent any lines that are less indentend than the docstr node
        # if line_indent < node_indent:
        #     line_indent = block_indent

        # A line that is indented less than the current block starts a new block.
        if line_indent < block_indent:
            finish_block()

        # A line that is the start of a markdown list starts a new block.
        elif line_str.strip().startswith(("- ", "* ")):
            finish_block()

        # A markdown title always starts a new block.
        elif line_str.strip().endswith(":"):
            finish_block()

        block_list.append(line_str)

        # Only make blocks for markdown list items. Write everything else as single line items.
        if not block_list[0].strip().startswith(("- ", "* ")):
            finish_block()

    # Finish the block that was in progress when the end of the docstring was reached.
    finish_block()

    return unwrap_list