def parse_time(value):
 match = time_re.match(value)
 if match:
  kw = match.groupdict()
  if kw['microsecond']:
   kw['microsecond'] = kw['microsecond'].ljust(6, '0')
  kw = dict(((k, int(v)) for (k, v) in six.iteritems(kw) if (v is not None)))
  return datetime.time(**kw)

def parse_time ( value ) : match = time_re . match ( value ) if match : kw = match . groupdict ( ) if kw [ 'microsecond' ] : kw [ 'microsecond' ] = kw [ 'microsecond' ] . ljust ( 6 , '0' ) kw = dict ( ( ( k , int ( v ) ) for ( k , v ) in six . iteritems ( kw ) if ( v is not None ) ) ) return datetime . time ( ** kw )
tries to make a time out of the value .