def METHOD_NAME(self, filename):
    """
    _save_
    Save data to a file
    Saved format is defined depending on the extension
    """
    with open(filename, 'wb') as handle:
        # TODO: use different encoding scheme for different extension
        # extension = filename.split(".")[-1].lower()
        # FIXME: once both central services and WMAgent are in Py3, we can remove protocol=0
        pickle.dump(self.data, handle, protocol=0)
    return