def _build_time(time, kwargs):
 tz = kwargs.pop('tz', 'UTC')
 if time:
  if kwargs:
   raise ValueError('Cannot pass kwargs and a time')
  else:
   return ensure_utc(time, tz)
 elif (not kwargs):
  raise ValueError('Must pass a time or kwargs')
 else:
  return datetime.time(**kwargs)

def _build_time ( time , kwargs ) : tz = kwargs . pop ( 'tz' , 'UTC' ) if time : if kwargs : raise ValueError ( 'Cannot pass kwargs and a time' ) else : return ensure_utc ( time , tz ) elif ( not kwargs ) : raise ValueError ( 'Must pass a time or kwargs' ) else : return datetime . time ( ** kwargs )
builds the time argument for event rules .