def _find_matching_brackets(args):
    """
    Given a string starting with an open bracket, return:
    - substring from the opening bracket to the matching closing bracket
    - the remainder
    """
    open_count = 0
    for index in range(len(args) - 1):
        if args[index] == '(':
            open_count += 1
        elif args[index] == ')':
            open_count -= 1
        if open_count == 0:
            return args[0:index + 1], args[index + 1:]
    if open_count > 1:
        raise Exception("Unmatched brackets in: %s", repr(args))
    return args