<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cols_to_keep(gctoo, cid=None, col_bool=None, cidx=None, exclude_cid=None):
 """ Figure out based on the possible columns inputs which columns to keep. Args: gctoo (GCToo object):
 cid (list of strings):
 col_bool (boolean array):
 cidx (list of integers):
 exclude_cid (list of strings):
 Returns: cols_to_keep (list of strings):
 col ids to be kept """


    # Use cid if provided
    if cid is not None:
        assert type(cid) == list, "cid must be a list. cid: {}".format(cid)

        cols_to_keep = [gctoo_col for gctoo_col in gctoo.data_df.columns if gctoo_col in cid]

        # Tell user if some cids not found
        num_missing_cids = len(cid) - len(cols_to_keep)
        if num_missing_cids != 0:
            logger.info("{} cids were not found in the GCT.".format(num_missing_cids))

    # Use col_bool if provided
    elif col_bool is not None:

        assert len(col_bool) == gctoo.data_df.shape[1], (
            "col_bool must have length equal to gctoo.data_df.shape[1]. " +
            "len(col_bool): {}, gctoo.data_df.shape[1]: {}".format(
                len(col_bool), gctoo.data_df.shape[1]))
        cols_to_keep = gctoo.data_df.columns[col_bool].values

    # Use cidx if provided
    elif cidx is not None:

        assert type(cidx[0]) is int, (
            "cidx must be a list of integers. cidx[0]: {}, " +
            "type(cidx[0]): {}").format(cidx[0], type(cidx[0]))

        assert max(cidx) <= gctoo.data_df.shape[1], (
            "cidx contains an integer larger than the number of columns in " +
            "the GCToo. max(cidx): {}, gctoo.data_df.shape[1]: {}").format(
                max(cidx), gctoo.data_df.shape[1])

        cols_to_keep = gctoo.data_df.columns[cidx].values

    # If cid, col_bool, and cidx are all None, return all columns
    else:
        cols_to_keep = gctoo.data_df.columns.values

    # Use exclude_cid if provided
    if exclude_cid is not None:

        # Keep only those columns that are not in exclude_cid
        cols_to_keep = [col_to_keep for col_to_keep in cols_to_keep if col_to_keep not in exclude_cid]

    return cols_to_keep