def set_matched_surfaces(surface, matched):
    """Set boundary conditions for two adjoining surfaces.

    :param surface: The first surface.
    :param matched: The second surface.
    """
    if str(surface.key).upper() == 'BUILDINGSURFACE:DETAILED' and str(matched
        .key).upper() == 'BUILDINGSURFACE:DETAILED':
        for s in [surface, matched]:
            s.Outside_Boundary_Condition = 'surface'
            s.Sun_Exposure = 'NoSun'
            s.Wind_Exposure = 'NoWind'
        surface.Outside_Boundary_Condition_Object = matched.Name
        matched.Outside_Boundary_Condition_Object = surface.Name
    elif str(surface.key).upper() == 'BUILDINGSURFACE:DETAILED' and str(matched
        .key).upper() in {'SHADING:SITE:DETAILED', 'SHADING:ZONE:DETAILED'}:
        surface.Outside_Boundary_Condition = 'adiabatic'
        surface.Sun_Exposure = 'NoSun'
        surface.Wind_Exposure = 'NoWind'
    elif str(matched.key).upper() == 'BUILDINGSURFACE:DETAILED' and str(surface
        .key).upper() in {'SHADING:SITE:DETAILED', 'SHADING:ZONE:DETAILED'}:
        matched.Outside_Boundary_Condition = 'adiabatic'
        matched.Sun_Exposure = 'NoSun'
        matched.Wind_Exposure = 'NoWind'
