<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_bootstrap_dataframe(orig_df, obs_id_col, resampled_obs_ids_1d, groupby_dict, boot_id_col="bootstrap_id"):
 """ Will create the altered dataframe of data needed to estimate a choice model with the particular observations that belong to the current bootstrap sample. Parameters orig_df : pandas DataFrame. Should be long-format dataframe containing the data used to estimate the desired choice model. obs_id_col : str. Should be a column name within `orig_df`. Should denote the original observation id column. resampled_obs_ids_1d : 1D ndarray of ints. Each value should represent the alternative id of a given bootstrap replicate. groupby_dict : dict. Each key will be a unique value in `orig_df[obs_id_col]` and each value will be the rows of `orig_df` where `orig_df[obs_id_col] == key`. boot_id_col : str, optional. Denotes the new column that will be created to specify the bootstrap observation ids for choice model estimation. Returns ------- bootstrap_df : pandas Dataframe. Will contain all the same columns as `orig_df` as well as the additional `boot_id_col`. For each value in `resampled_obs_ids_1d`, `bootstrap_df` will contain the long format rows from `orig_df` that have the given observation id. """

    # Check the validity of the passed arguments.
    check_column_existence(obs_id_col, orig_df, presence=True)
    check_column_existence(boot_id_col, orig_df, presence=False)
    # Alias the observation id column
    obs_id_values = orig_df[obs_id_col].values
    # Check the validity of the resampled observation ids.
    ensure_resampled_obs_ids_in_df(resampled_obs_ids_1d, obs_id_values)

    # Initialize a list to store the component dataframes that will be
    # concatenated to form the final bootstrap_df
    component_dfs = []

    # Populate component_dfs
    for boot_id, obs_id in enumerate(resampled_obs_ids_1d):
        # Extract the dataframe that we desire.
        extracted_df = groupby_dict[obs_id].copy()
        # Add the bootstrap id value.
        extracted_df[boot_id_col] = boot_id + 1
        # Store the component dataframe
        component_dfs.append(extracted_df)

    # Create and return the desired dataframe.
    bootstrap_df = pd.concat(component_dfs, axis=0, ignore_index=True)
    return bootstrap_df