import pickle


def pickle_save(obj, fp, verbose=1):
    """Save an object as a pickle file."""
    try:
        with open(fp, 'wb') as f:
            pickle.dump(obj, f)
    except Exception as err:
        if verbose: print("Saving object failed. Error:", err)
        return False
    else:
        if verbose: print(f"Object saved as '{fp}'")
        return True