How can I assert that a Tensor looks like the following (for example):

```
[ True, True ]
[ True, True, True, False, False, False, False ]
[ True, True, True, False, False ]
[ True, False, False, False, False ]
[ False, False ]

```

but reject inputs like these:

```
[ True, False, True, False, False, True, False ]
[ False, False, False, False, True ]

```

Or more generally speaking: I want to test whether a Tensor only consists of a sequence of 0 to N values of True, followed by 0 to N values of False. How can I do that with Tensorflow 2?