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)
def load_pickle ( file , encoding = None ) : if encoding : with open ( file , 'rb' ) as f : return pickle . load ( f , encoding = encoding ) with open ( file , 'rb' ) as f : return pickle . load ( f )
Load a pickle file.

    Args:
        file (str): Path to pickle file

    Returns:
        object: Loaded object from pickle file