def from_bits(bin_str: str):
    """
    This function will convert a binary string (with or without prefix) into a integer;
    :param bin_str: A binary string to convert into integer
    :return: A integer representing the given binary string
    """
    return int(bin_str, 2)