code: def _maybe_make_unit_desc(self, unit_desc):
      
      if isinstance(unit_desc, str) or unit_desc is None:
        unit_desc = units.Unit(unit_desc)
      if not isinstance(unit_desc, units.UnitDescriptor):
        raise TypeError('Invalid units for measurement %s: %s' % (self.name,
                                                                  unit_desc))
      return unit_desc
docs: Return the UnitDescriptor or convert a string to one.