# Path: pyDEA/core/utils/dea_utils.py
# def is_efficient(efficiency_score, lambda_variable):
#     ''' Checks if dmu with given efficiency score and value of
#         lambda variable is efficient.
# 
#         Args:
#             efficiency_score (double): efficiency spyDEA.core.
#             lambda_variable (double): value of lambda variable corresponding
#                 to DMU under consideration.
# 
#         Returns:
#             bool: True if DMU is efficient, False otherwise.
# 
#         Example:
#             >>> is_efficient(1, 1)
#             True
#             >>> is_efficient(0.5, 0)
#             False
#             >>> is_efficient(0.9999999, 1)
#             True
#             >>> is_efficient(1.0000001, 1)
#             True
# 
#     '''
#     if efficiency_score == 1:
#         return True
#     if lambda_variable > ZERO_TOLERANCE:
#         return True
#     # it seems that lambda_variable is not ultimate indication of efficiency
#     if efficiency_score > 1:
#         return True
#     return False
# 
# TMP_FOLDER = 'tmp'


from pulp import LpStatus, LpStatusOptimal
from pyDEA.core.utils.dea_utils import is_efficient, TMP_FOLDER
import pickle
import os
                ValueError: if dmu_code does not exist or has invalid
                    value.
        '''
        self._check_efficiency_score(efficiency_score)
        self._check_if_dmu_code_exists(dmu_code)
        self.efficiency_scores[dmu_code] = efficiency_score

    def _check_efficiency_score(self, efficiency_score):
        ''' Checks if efficiency score has a valid value.

            Args:
                efficiency_score (double): efficiency spyDEA.core.

            Raises:
                ValueError: if efficiency score has invalid value.
        '''
        if efficiency_score < 0 or efficiency_score > 1:
            raise ValueError('Efficiency score must be within [0, 1]')

    def get_efficiency_score(self, dmu_code):
        ''' Returns efficiency score of a given DMU.

            Args:
                dmu_code (str): DMU code.

            Returns:
                double: efficiency spyDEA.core.
        '''
        return self.efficiency_scores[dmu_code]


# Path: pyDEA/core/utils/dea_utils.py
# def is_efficient(efficiency_score, lambda_variable):
#     ''' Checks if dmu with given efficiency score and value of
#         lambda variable is efficient.
# 
#         Args:
#             efficiency_score (double): efficiency spyDEA.core.
#             lambda_variable (double): value of lambda variable corresponding
#                 to DMU under consideration.
# 
#         Returns:
#             bool: True if DMU is efficient, False otherwise.
# 
#         Example:
#             >>> is_efficient(1, 1)
#             True
#             >>> is_efficient(0.5, 0)
#             False
#             >>> is_efficient(0.9999999, 1)
#             True
#             >>> is_efficient(1.0000001, 1)
#             True
# 
#     '''
#     if efficiency_score == 1:
#         return True
#     if lambda_variable > ZERO_TOLERANCE:
#         return True
#     # it seems that lambda_variable is not ultimate indication of efficiency
#     if efficiency_score > 1:
#         return True
#     return False
# 
# TMP_FOLDER = 'tmp'


# Path: pyDEA/core/data_processing/solution.py
from pulp import LpStatus, LpStatusOptimal
from pyDEA.core.utils.dea_utils import is_efficient, TMP_FOLDER
import pickle
import os

                ValueError: if dmu_code does not exist or has invalid
                    value.
        '''
        self._check_efficiency_score(efficiency_score)
        self._check_if_dmu_code_exists(dmu_code)
        self.efficiency_scores[dmu_code] = efficiency_score

    def _check_efficiency_score(self, efficiency_score):
        ''' Checks if efficiency score has a valid value.

            Args:
                efficiency_score (double): efficiency spyDEA.core.

            Raises:
                ValueError: if efficiency score has invalid value.
        '''
        if efficiency_score < 0 or efficiency_score > 1:
            raise ValueError('Efficiency score must be within [0, 1]')

    def get_efficiency_score(self, dmu_code):
        ''' Returns efficiency score of a given DMU.

            Args:
                dmu_code (str): DMU code.

            Returns:
                double: efficiency spyDEA.core.
        '''
        return self.efficiency_scores[dmu_code]


    def is_efficient(self, dmu_code, lambda_variables=None):