def _expand_to_event_rank(self, x):
expanded_x = x<EOL>for _ in range(tensorshape_util.rank(self.event_shape)):<EOL><INDENT>expanded_x = tf.expand_dims(expanded_x, -<NUM_LIT:1>)<EOL><DEDENT>return expanded_x<EOL>
Expand the rank of x up to static_event_rank times for broadcasting.

        The static event rank was checked to not be None at construction time.

        Args:
          x: A tensor to expand.
        Returns:
          The expanded tensor.