def METHOD_NAME(self, value, protocol=pickle.HIGHEST_PROTOCOL):
    try:
        serialized = pickle.METHOD_NAME(value, protocol)
    except (pickle.PickleError, pickle.PicklingError) as e:
        self._warn(e)
    return serialized