def get_up_hill(hosp_data):
    """Given the temporal data of a hospital, get the portion of the timeline
    belonging to an up-hill peak, up to the point of the first critical state
    is found.

    Parameters
    -----------
    hosp_data: pd.DataFrame
        Historical capacidad hospitalaria of a single hospital.
        Rows correspond to a daily record of its capacity.

    Returns
    --------
    up_hill_data: pd.DataFrame
        Portion of the data that bellongs to an up-hill segment of the
        historical data up to the first next critical status.
    hosp_data: pd.DataFrame
        Remaining portion of the data, with the up_hill_data removed.
    """

    is_peak = hosp_data['estatus_capacidad_uci'] == 'Crítica'
    if is_peak.sum() > 0:
        idx_peak = is_peak.argmax()

        up_hill_data = hosp_data.iloc[
            :idx_peak + 1]

        hosp_data = hosp_data.iloc[
            idx_peak + 1:]
    else:
        up_hill_data = None
        hosp_data = None

    return up_hill_data, hosp_data