def get_impute_str(column_name, imputation):
    """
    Creates string for sql imputation

    Args:
        - column_name: str name of column to be imputed
        - imputation: str indicating method of imputation

    Returns:
        - impute_sql: str sql imputation code
        - impute_col_flag: boolean if true an impuatation flag column will be created
    """
    impute_sql = ''

    # check whether to create an imputation flag
    impute_col_flag = not imputation.endswith('_noflag')

    # determine type of imputation and create appropriate sql code to do so
    if imputation.startswith('zero'):
        impute_sql = '0'
    elif imputation.startswith('inf'):
        impute_sql = '100000000'
    elif imputation.startswith('mean') or imputation.startswith('avg'):
        impute_sql = f'avg({column_name}) over ()'
    elif imputation.startswith('min'):
        impute_sql = f'min({column_name}) over ()'
    elif imputation.startswith('max'):
        impute_sql = f'max({column_name}) over ()'
    else:
        raise ValueError(f'Unrecognized impute method {imputation}.')

    return (impute_sql, impute_col_flag)