<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_dimensions_units(names):
 """Create dictionary of unit dimensions."""

    dimensions_uni = {}

    for name in names:

        key = get_key_from_dimensions(names[name].dimensions)
        dimensions_uni[key] = names[name]
        plain_dimensions = [{'base': name, 'power': 1}]
        key = get_key_from_dimensions(plain_dimensions)
        dimensions_uni[key] = names[name]

        if not names[name].dimensions:
            names[name].dimensions = plain_dimensions

        names[name].dimensions = [{'base': names[i['base']].name,
                                   'power': i['power']} for i in
                                  names[name].dimensions]

    return dimensions_uni