def get_columns(api, config):
    """
    Get the trello column ids for a trello board given a api handle and the id
    of the board.

    :param api: A trollo Boards api handle.
    :param dict config: The configuration data (see note below for details).
    :return: A tuple of column trello ids

    .. note::
        Required configuration keys and values
            * board_id The trello board unique id
            * new_column The name(str) of the column where new cards are added
              This would be the same name as seen in the Trello webui
            * close_column The name(str) of the column where closed/inactive
              are moved.
              This would be the same name as seen in the Trello webui
    """
    for key in ['board_id', 'new_column', 'close_column']:
        if key not in config:
            raise KeyError(f"A required key '{key}' is missing in the config")

    column_data = {x['name']: x['id']
                   for x in api.get_list(config['board_id'])}
    return (column_data[config['new_column']],
            column_data[config['close_column']])