def METHOD_NAME(Qwwf, Qww, tsww, trww, mcptw, mcpww, SW_ratio):
    """
    Calculate sewage temperature and flow rate released from DHW usages and Fresh Water (FW) in buildings.
    :param Qwwf: final DHW heat requirement
    :type Qwwf: float
    :param Qww: DHW heat requirement
    :type Qww: float
    :param tsww: DHW supply temperature
    :type tsww: float
    :param trww: DHW return temperature
    :type trww: float
    :param totwater: fresh water flow rate
    :type totwater: float
    :param mcpww: DHW heat capacity
    :type mcpww: float
    :param SW_ratio: ratio of decrease/increase in sewage water due to solids and also water intakes.
    :type SW_ratio: float
    :returns mcp_combi: sewage water heat capacity [kW_K]
    :rtype mcp_combi: float
    :returns t_to_sewage: sewage water temperature
    :rtype t_to_sewage: float
    """
    if Qwwf > 0:
        Qloss_to_spur = Qwwf - Qww
        t_spur = tsww - Qloss_to_spur / mcpww
        m_DHW = mcpww * SW_ratio
        m_TW = mcptw * SW_ratio
        mcp_combi = m_DHW + m_TW
        t_combi = ( m_DHW * t_spur + m_TW * trww ) / mcp_combi
        t_to_sewage = 0.90 * t_combi                  # assuming 10% thermal loss through piping
    else:
        t_to_sewage = trww
        mcp_combi = mcptw * SW_ratio  # in [kW_K]
    return mcp_combi, t_to_sewage # in lh or kgh and in C