def conform_values(taxis1, taxis2):
    """Given two time axes, return new axes such that their values are comparable."""
    from pygeode.timeaxis import Time
    assert isinstance(taxis1, Time)
    assert isinstance(taxis2, Time)
    assert type(taxis1) is type(taxis2
        ), "can't conform time axes of different types"
    allowed_fields = type(taxis1).allowed_fields
    if set(taxis1.auxarrays.keys()) < set(taxis2.auxarrays.keys()):
        taxis1, taxis2 = taxis2, taxis1
    assert set(taxis1.auxarrays.keys()) >= set(taxis2.auxarrays.keys()
        ), 'incompatible fields'
    end_resolution = False
    for name in allowed_fields:
        if name not in taxis1.auxarrays:
            continue
        if end_resolution:
            assert name not in taxis2.auxarrays, 'incompatible fields'
        if name not in taxis2.auxarrays:
            end_resolution = True
    units = taxis2.units
    startdate = taxis2.startdate
    taxis1 = type(taxis1)(units=units, startdate=startdate, **taxis1.auxarrays)
    return taxis1, taxis2
