<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def len_cdc_tube(FlowPlant, ConcDoseMax, ConcStock, DiamTubeAvail, HeadlossCDC, LenCDCTubeMax, temp, en_chem, KMinor):
 """The length of tubing may be longer than the max specified if the stock concentration is too high to give a viable solution with the specified length of tubing."""

   index = i_cdc(FlowPlant, ConcDoseMax, ConcStock,
                DiamTubeAvail, HeadlossCDC, LenCDCTubeMax, temp,
                en_chem, KMinor)
   len_cdc_tube = (_length_cdc_tube_array(FlowPlant, ConcDoseMax, ConcStock,
                                        DiamTubeAvail, HeadlossCDC, temp, en_chem,
                                        KMinor))[index].magnitude

   return len_cdc_tube