def beginFlowingFrom(drain, fount):
    """
    To correctly implement drain.flowingFrom you need to do certian things; do
    those things here.

    @param drain: The drain implementing flowingFrom.

    @param fount: The fount flowingFrom was called with.

    @return: L{None}
    """
    if fount is not None:
        outType = fount.outputType
        inType = drain.inputType
        if outType is not None and inType is not None:
            if not inType.isOrExtends(outType):
                raise TypeError(
                    'the output of {fount}, {outType}, is not compatible with the required input type of {drain}, {inType}'
                    .format(inType=inType, outType=outType, fount=fount,
                    drain=drain))
    oldFount = drain.fount
    drain.fount = fount
    if (oldFount is not None and oldFount is not fount and oldFount.drain is
        drain):
        oldFount.flowTo(None)
