<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_multi_temperature_data( energy_trajs, temp_trajs, energy_unit, temp_unit, reference_temperature=None):
 r""" Wraps data from multi-temperature molecular dynamics. Parameters energy_trajs : list of N arrays, each of shape (T_i,) List of arrays, each having T_i rows, one for each time step, containing the potential energies time series in units of kT, kcal/mol or kJ/mol. temp_trajs : list of N int arrays, each of shape (T_i,) List of arrays, each having T_i rows, one for each time step, containing the heat bath temperature time series (at which temperatures the frames were created) in units of K or C. Alternatively, these trajectories may contain kT values instead of temperatures. energy_unit: str, optional, default='kcal/mol' The physical unit used for energies. Current options: kcal/mol, kJ/mol, kT. temp_unit : str, optional, default='K' The physical unit used for the temperature. Current options: K, C, kT reference_temperature : float or None, optional, default=None Reference temperature against which the bias energies are computed. If not given, the lowest temperature or kT value is used. If given, this parameter must have the same unit as the temp_trajs. Returns ------- ttrajs : list of N+M int arrays, each of shape (T_i,) are in at any time. btrajs : list of N+M float arrays, each of shape (T_i, K) The floats are the reduced bias energies for each thermodynamic state and configuration. temperatures : float array of length K The individual temperatures labelled accordingly to ttrajs. unbiased_state : int or None Index of the unbiased thermodynamic state (if present). """

    ttrajs, temperatures = _get_multi_temperature_parameters(temp_trajs)
    if reference_temperature is None:
        reference_temperature = temperatures.min()
    else:
        assert isinstance(reference_temperature, (int, float)), \
            'reference_temperature must be numeric'
        assert reference_temperature > 0.0, 'reference_temperature must be positive'
    btrajs = _get_multi_temperature_bias_sequences(
        energy_trajs, temp_trajs, temperatures, reference_temperature, energy_unit, temp_unit)
    if reference_temperature in temperatures:
        unbiased_state = _np.where(temperatures == reference_temperature)[0]
        try:
            unbiased_state = unbiased_state[0]
        except IndexError:
            unbiased_state = None
    else:
        unbiased_state = None
    return ttrajs, btrajs, temperatures, unbiased_state