'Sets the length of the sequence to the specified number of steps.
If the event sequence is not long enough, pads with time shifts to make the
sequence the specified length. If it is too long, it will be truncated to
the requested length.
Args:
steps: How many quantized steps long the event sequence should be.
from_left: Whether to add/remove from the left instead of right.'

def set_length(self, steps, from_left=False):

    if from_left:
        raise NotImplementedError('from_left    is    not    supported')
    if (self.num_steps < steps):
        self._append_steps((steps - self.num_steps))
    elif (self.num_steps > steps):
        self._trim_steps((self.num_steps - steps))
    assert (self.num_steps == steps)
