<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def drain_OD(q_plant, T, depth_end, SDR):
 """Return the nominal diameter of the entrance tank drain pipe. Depth at the end of the flocculator is used for headloss and length calculation inputs in the diam_pipe calculation. Parameters q_plant: float Plant flow rate T: float Design temperature depth_end: float The depth of water at the end of the flocculator SDR: float Standard dimension ratio Returns ------- float ? Examples -------- ?? """

    nu = pc.viscosity_kinematic(T)
    K_minor = con.PIPE_ENTRANCE_K_MINOR + con.PIPE_EXIT_K_MINOR + con.EL90_K_MINOR
    drain_ID = pc.diam_pipe(q_plant, depth_end, depth_end, nu, mat.PVC_PIPE_ROUGH, K_minor)
    drain_ND = pipe.SDR_available_ND(drain_ID, SDR)
    return pipe.OD(drain_ND).magnitude