def normalize_timedeltas(context, builder, left, right, leftty, rightty):
 factor = npdatetime.get_timedelta_conversion_factor(leftty.unit, rightty.unit)
 if (factor is not None):
  return (scale_by_constant(builder, left, factor), right)
 factor = npdatetime.get_timedelta_conversion_factor(rightty.unit, leftty.unit)
 if (factor is not None):
  return (left, scale_by_constant(builder, right, factor))
 raise RuntimeError(('cannot normalize %r and %r' % (leftty, rightty)))

def normalize_timedeltas ( context , builder , left , right , leftty , rightty ) : factor = npdatetime . get_timedelta_conversion_factor ( leftty . unit , rightty . unit ) if ( factor is not None ) : return ( scale_by_constant ( builder , left , factor ) , right ) factor = npdatetime . get_timedelta_conversion_factor ( rightty . unit , leftty . unit ) if ( factor is not None ) : return ( left , scale_by_constant ( builder , right , factor ) ) raise RuntimeError ( ( 'cannot normalize %r and %r' % ( leftty , rightty ) ) )
scale either *left* or *right* to the others unit .