def split_chunks(string):
    """
    >>> split_chunks("FooBar")
    ['Foo', 'Bar']
    >>> split_chunks("fooBar")
    ['foo', 'Bar']
    >>> split_chunks("foo_bar")
    ['foo', 'bar']

    """
    if "_" in string:
        return string.split("_")
    res = list()
    chunk = ""
    for c in string:
        if c.isupper():
            if chunk:
                res.append(chunk)
            chunk = c
        else:
            chunk += c
    if chunk:
        res.append(chunk)
    return res