def get_physical_type(unit):
 r = unit._get_physical_type_id()
 return _physical_unit_mapping.get(r, u'unknown')

def get_physical_type ( unit ) : r = unit . _get_physical_type_id ( ) return _physical_unit_mapping . get ( r , u'unknown' )
given a unit .