@staticmethod
def pad(input_sequence, length, pad_char):
    """
        Pad the given iterable, so that it is the correct length.

        :param input_sequence: Any iterable object
        :param length: The desired length of the output.
        :type length: int
        :param pad_char: The character or int to be added to short sequences
        :type pad_char: str or int
        :return: A sequence, of len `length`
        :rtype: []
        """
    if isinstance(input_sequence, str):
        input_sequence = list(input_sequence)
    if len(input_sequence) == length:
        return input_sequence
    elif len(input_sequence) > length:
        return input_sequence[:length]
    else:
        padding_len = length - len(input_sequence)
        padding = [pad_char] * padding_len
        return list(input_sequence) + list(padding)
