def get_calls_from_doc(doc):
    """
    Parses a docstring looking for indented blocks that start with $.
    It returns the first lines as call and the rest of the blocks as outputs.
    """
    if doc is None:
        return []
    calls = []
    outputs = []
    out = []
    block_indent = 2
    for line in doc.split("\n"):
        if BLOCK_START.match(line):
            block_indent = line.find("$")
            calls.append(shlex.split(line[block_indent + 1 :]))
            out = []
            outputs.append(out)
        elif line.startswith(" " * block_indent):
            out.append(line[block_indent:])
        else:
            out = []

    return zip(calls, outputs)

    Parses a docstring looking for indented blocks that start with $.
    It returns the first lines as call and the rest of the blocks as outputs.
    
tests/conftest.py