def GetEndOfBlock(code, end_op):
    """Get the last line of block."""
    """It returns -1 if it can't find."""
    for i in code:
        if end_op in i:
            return code.index(i)
    else:
        return -1