def pad_bits(bin_str: str, no_of_bytes: int):
    """
    This function will 'left zero pad' `bin_str`, if necessary,
     to ensure that it matches length `num_of_bytes`;
    :param bin_str: A binary string which will be padded with '0's if necessary
    :param no_of_bytes: The number of bytes to determine the byte size of the return value
    :return: A string representing bin_str with or without padding
    """
    difference = (no_of_bytes * 8) - len(bin_str)
    if difference <= 0:
        return bin_str
    else:
        padding = "0" * difference
        return padding + bin_str