<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_pickle(file, encoding=None):
 """Load a pickle file. Args: file (str):
 Path to pickle file Returns: object: Loaded object from pickle file """

    # TODO: test set encoding='latin1' for 2/3 incompatibility
    if encoding:
        with open(file, 'rb') as f:
            return pickle.load(f, encoding=encoding)

    with open(file, 'rb') as f:
       return pickle.load(f)