def _validate_timedelta_unit(arg):
 try:
  return _unit_map[arg]
 except:
  if (arg is None):
   return 'ns'
  raise ValueError('invalid timedelta unit {0} provided'.format(arg))

def _validate_timedelta_unit ( arg ) : try : return _unit_map [ arg ] except : if ( arg is None ) : return 'ns' raise ValueError ( 'invalid timedelta unit {0} provided' . format ( arg ) )
provide validation / translation for timedelta short units .