def parse_state_line(line):
    """
    Parse a line from a Tor state line and return the data that we should plot in the histogram

    For example if it's (CircuitBuildTimeBin 342 4) return (342, 342, 342, 342)
    """
    items = line.split()

    # We only use CircuitBuildTimeBin lines
    if len(items) < 1:
        return None
    if items[0] == "CircuitBuildTimeBin":
        value = int(items[1])
        occurences = int(items[2])
    elif items[0] == "CircuitBuildAbandonedCount":
        value = float("NaN")
        occurences = int(items[1])
    else:
        return None

    return ([value] * occurences)