def _get_data(isotherm, data_name, current_branch, drange, **kwargs):
    """Get different data from an isotherm."""
    if data_name == 'pressure':
        data = isotherm.pressure(branch=current_branch, pressure_mode=
            kwargs['pressure_mode'], pressure_unit=kwargs['pressure_unit'],
            min_range=drange[0], max_range=drange[1], indexed=True)
    elif data_name == 'loading':
        data = isotherm.loading(branch=current_branch, loading_basis=kwargs
            ['loading_basis'], loading_unit=kwargs['loading_unit'],
            adsorbent_basis=kwargs['adsorbent_basis'], adsorbent_unit=
            kwargs['adsorbent_unit'], min_range=drange[0], max_range=drange
            [1], indexed=True)
    else:
        data = isotherm.other_data(data_name, branch=current_branch,
            min_range=drange[0], max_range=drange[1], indexed=True)
    return data
