guides/understanding_masking_and_padding.py/MyLayer/call
class MyLayer:    def call(self, inputs):
        x = self.embedding(inputs)
        # Note that you could also prepare a `mask` tensor manually.
        # It only needs to be a boolean tensor
        # with the right shape, i.e. (batch_size, timesteps).
        mask = self.embedding.compute_mask(inputs)
        output = self.lstm(
            x, mask=mask
        )  # The layer will ignore the masked values
        return output