def statementsAreSame(statements: List[HdlStatement]) -> bool:
iterator = iter(statements)<EOL>try:<EOL><INDENT>first = next(iterator)<EOL><DEDENT>except StopIteration:<EOL><INDENT>return True<EOL><DEDENT>return all(first.isSame(rest) for rest in iterator)<EOL>
:return: True if all statements are same