def create_variable(df, name, label, label_map, default_value=0):
    """
    Create a new variable (column) in the specified dataframe. The label of
    this variable will be appended the global label map.
    
    Parameters
    ----------
    df : pandas DataFrame
        dataframe to add variable/column to
    name : str
        name of column to be created
    label : str
        label to be assigned to this variable in the global label map
    default_value : int or float
        value to be assigned to every case of new variable (0 by default)

    Returns
    -------
    output_df : pandas DataFrame
        dataframe containing new variable
    """
    output_df = df.copy()
    output_df[name] = default_value
    
    label_map[name] = label
    
    return output_df