code: def get_dimensions_units(names):
      
      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
docs: Create dictionary of unit dimensions.