def _split_value_units(raw_str):
    """Take a string with a numerical value and units, and separate the
    two.

    Args:
        raw_str (str): the string to parse, with numerical value and
        (optionally) units.

    Returns:
        A tuple (value, units), where value is a string and units is
        either a string or `None` if no units were found.
    """
    try:
        units_index = next(i for i, c in enumerate(raw_str) if c.isalpha())
    except StopIteration:
        # no units found
        return (raw_str, None)

    return (raw_str[:units_index], raw_str[units_index:])