import pickle


def load_single_value(path_and_file):
    """
    Open a file in the binary mode, load a single value, return it and close file

    Load the binary value:
    >>> value = load_single_value("test_file_single.tmp")
    >>> print(value)
    test_value

    :param path_and_file: path to file
    :return: value in file
    """
    with open(path_and_file, mode='rb') as f:
        return pickle.load(f)