def parse_size(size):
    tokens = tokenize(size)
    if tokens and isinstance(tokens[0], numbers.Number):
        # If the input contains only a number, it's assumed to be the number of bytes.
        if len(tokens) == 1:
            return int(tokens[0])
        # Otherwise we expect to find two tokens: A number and a unit.
        if len(tokens) == 2 and is_string(tokens[1]):
            normalized_unit = tokens[1].lower()
            # Try to match the first letter of the unit.
            for unit in disk_size_units:
                if normalized_unit.startswith(unit['prefix']):
                    return int(tokens[0] * unit['divider'])
    # We failed to parse the size specification.
    msg = "Failed to parse size! (input %r was tokenized as %r)"
    raise InvalidSize(msg % (size, tokens))
generate binary string label for each node
dataset/ETHPy150Open xolox/python-humanfriendly/humanfriendly/__init__.py/parse_size--crossover with--dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.gen_node_ids_print