def experiment_type_from_filename(filename):
    """
    Get the experiment type based on filename.

    It is assumed that the filename is compliant with
    '<some_path>/measurements_<experiment_type>_summary.csv'

    :param filename: A string representing the file name. It can be either full
        or relative path.
    :return: A string representing the filename:

    Example:
        exp_type = experiment_type_from_filename(
            './measurements_interprocess_best_effort_tcp_summary.csv'
        )
        exp_type -> interprocess_best_effort_tcp
    """
    exp_type = filename.split('/')[-1].split('.')[-2].split('_')[1:-1]
    return '_'.join(exp_type)