code: def build_unit_name(dimensions):
      
      name = ''
  
      for unit in dimensions:
          if unit['power'] < 0:
              name += 'per '
          power = abs(unit['power'])
          if power == 1:
              name += unit['base']
          elif power == 2:
              name += 'square ' + unit['base']
          elif power == 3:
              name += 'cubic ' + unit['base']
          elif power > 3:
              name += unit['base'] + ' to the %g' % power
          name += ' '
  
      name = name.strip()
  
      logging.debug(u'\tUnit inferred name: %s', name)
  
      return name
docs: Build the name of the unit from its dimensions.