import pickle


def read_pic(dir, file):

    """
    Function that reads a pickle variable file and returns it.

    Arguments:
        dir -- directory that contains the file
        file -- name of the pickle file

    Returns:
        x -- pickle variable contained in the file
    """


    f = open(dir + '/' + file, 'rb')
    x = pickle.load(f)
    f.close()

    return x