def METHOD_NAME(f, fact_table_name, dimension, dimension_name, attribute_names):
    some_column_ref = dimension['attributes'][attribute_names[0]]['column']
    table_name, column_name = qualify(fact_table_name, some_column_ref)
    column_str = ", ".join(map(attr_column_f(fact_table_name, dimension),
                               sorted(attribute_names)))
    f.write("CREATE INDEX %s_dimension_%s_idx ON %s (%s);\n"
            % (table_name, dimension_name, table_name, column_str))