def get_previous_blank_line_no(lines, idx):
    """Find a blank line before the object definition"""

    while True:
        if not lines[idx].strip():
            # found a blank line
            break
        else:
            idx -= 1

    return idx